projects
/
platform
/
core
/
uifw
/
libds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad6ff88
)
shm: Fix using negative fd
54/280254/1
author
Seunghun Lee
<shiin.lee@samsung.com>
Thu, 25 Aug 2022 09:28:27 +0000
(18:28 +0900)
committer
Tizen Window System
<tizen.windowsystem@gmail.com>
Fri, 26 Aug 2022 01:19:20 +0000
(10:19 +0900)
Change-Id: Ib241e89b48c3ff338ecd30178a33a7477802ff0b
clients/simple-shm-shell.c
patch
|
blob
|
history
diff --git
a/clients/simple-shm-shell.c
b/clients/simple-shm-shell.c
index
cbc92da
..
e0bdcb4
100644
(file)
--- a/
clients/simple-shm-shell.c
+++ b/
clients/simple-shm-shell.c
@@
-104,8
+104,10
@@
_create_anonymous_file (off_t size)
strncat(name, template, PATH_MAX);
fd = mkstemp(name);
- if (fd >= 0)
- unlink(name);
+ if (fd < 0)
+ return -1;
+
+ unlink(name);
ret = ftruncate(fd, size);
if (ret < 0) {