projects
/
platform
/
core
/
uifw
/
libtdm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e056ea
)
log: fix memory leak
25/171125/3
author
Boram Park
<boram1288.park@samsung.com>
Mon, 26 Feb 2018 23:36:53 +0000
(08:36 +0900)
committer
Boram Park
<boram1288.park@samsung.com>
Tue, 27 Feb 2018 00:19:12 +0000
(09:19 +0900)
Change-Id: I50b1de495e6af2562832d2bc363991aaa17fef0d
common/tdm_log.c
patch
|
blob
|
history
diff --git
a/common/tdm_log.c
b/common/tdm_log.c
index 996618d37629731fb2fd2757ca72c8acfc458488..46307709aa5f239b365e0a9671c032ab84200267 100644
(file)
--- a/
common/tdm_log.c
+++ b/
common/tdm_log.c
@@
-131,7
+131,11
@@
tdm_log_set_path(const char *path)
if (stdout_fd == -1) {
fflush(stdout);
stdout_fd = dup(STDOUT_FILENO);
- TDM_RETURN_IF_FAIL(stdout_fd != -1);
+ if (stdout_fd < 0) {
+ TDM_ERR("dup failed: %m\n");
+ fclose(log_fl);
+ return;
+ }
}
setvbuf(log_fl, NULL, _IOLBF, 512);