From: Konstantin Drabeniuk Date: Wed, 28 Sep 2016 13:37:30 +0000 (+0300) Subject: check if the path is null. X-Git-Tag: accepted/tizen/common/20161004.194301~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df6a1ee118fe9cc23ba937f732c8b89d5922b640;p=platform%2Fcore%2Fuifw%2Flibtdm.git check if the path is null. fix build error Change-Id: I9c1f8554c90443a16a877f7c06d1ea9f7bf21bfc Signed-off-by: Konstantin Drabeniuk --- diff --git a/src/tdm.c b/src/tdm.c index 5bf0f44..d9d8d07 100644 --- a/src/tdm.c +++ b/src/tdm.c @@ -1053,7 +1053,7 @@ INTERN tdm_error tdm_display_enable_dump(tdm_private_display *private_display, const char *dump_str, char *reply, int *len) { char temp[TDM_PATH_LEN] = {0,}, temp2[TDM_PATH_LEN] = {0,}; - char *path, *path2; + char *path = NULL, *path2; char *arg; char *end; @@ -1131,7 +1131,9 @@ tdm_display_enable_dump(tdm_private_display *private_display, const char *dump_s TDM_INFO("dump... '%s'", dump_str); done: - free(path); + if (path) + free(path); + return TDM_ERROR_NONE; }