summaryrefslogtreecommitdiff
path: root/src/ipc/media-thumb-ipc.c
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-07-14 19:34:14 +0900
committerMinje Ahn <minje.ahn@samsung.com>2015-07-14 19:34:14 +0900
commit8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf (patch)
treeb50faa9b85f0ecd9a13d03b1d7893b5fed77ef70 /src/ipc/media-thumb-ipc.c
parent51e31533b89929b6aed1a1727c0500cb01ce2d9f (diff)
downloadlibmedia-thumbnail-8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf.tar.gz
libmedia-thumbnail-8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf.tar.bz2
libmedia-thumbnail-8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf.zip
Fix memory leak
Change-Id: I496932086d15704878ba0754a5b6d8ba6b7281df Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/ipc/media-thumb-ipc.c')
-rwxr-xr-xsrc/ipc/media-thumb-ipc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipc/media-thumb-ipc.c b/src/ipc/media-thumb-ipc.c
index add4ba3..53f3ba2 100755
--- a/src/ipc/media-thumb-ipc.c
+++ b/src/ipc/media-thumb-ipc.c
@@ -581,6 +581,8 @@ static char* _media_thumb_get_default_path(uid_t uid)
grpinfo = getgrnam("users");
if(grpinfo == NULL) {
thumb_err("getgrnam(users) returns NULL !");
+ if(result_psswd)
+ free(result_psswd);
return NULL;
}
}
@@ -682,8 +684,7 @@ int _media_thumb_process(thumbMsg *req_msg, thumbMsg *res_msg, uid_t uid)
thumb_path[strlen(thumb_path)] = '\0';
}
- if (g_file_test(thumb_path,
- G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
+ if (g_file_test(thumb_path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR)) {
thumb_warn("thumb path already exists in file system.. remove the existed file");
_media_thumb_remove_file(thumb_path);
}