projects
/
platform
/
core
/
appfw
/
app2sd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix static analysis issue
[platform/core/appfw/app2sd.git]
/
plugin
/
app2sd
/
server
/
app2sd_internals_utils.c
diff --git
a/plugin/app2sd/server/app2sd_internals_utils.c
b/plugin/app2sd/server/app2sd_internals_utils.c
index
59219e6
..
c3df8cb
100644
(file)
--- a/
plugin/app2sd/server/app2sd_internals_utils.c
+++ b/
plugin/app2sd/server/app2sd_internals_utils.c
@@
-348,8
+348,10
@@
static int generate_random_num(unsigned short* buf, int len) {
if (fd < 0)
return -1;
- if (read(fd, buf, len) < 0)
- return -1;
+ if (read(fd, buf, len) < 0) {
+ close(fd);
+ return -1;
+ }
close(fd);