summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMinje Ahn <minje.ahn@samsung.com>2015-07-14 10:34:14 (GMT)
committerMinje Ahn <minje.ahn@samsung.com>2015-07-14 10:34:14 (GMT)
commit8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf (patch)
treeb50faa9b85f0ecd9a13d03b1d7893b5fed77ef70 /src/util
parent51e31533b89929b6aed1a1727c0500cb01ce2d9f (diff)
downloadlibmedia-thumbnail-8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf.zip
libmedia-thumbnail-8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf.tar.gz
libmedia-thumbnail-8c59dd38edf2bfa6f7af1249e6df868cbc7b45cf.tar.bz2
Change-Id: I496932086d15704878ba0754a5b6d8ba6b7281df Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
Diffstat (limited to 'src/util')
-rwxr-xr-xsrc/util/media-thumb-util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/media-thumb-util.c b/src/util/media-thumb-util.c
index 485d13a..387a941 100755
--- a/src/util/media-thumb-util.c
+++ b/src/util/media-thumb-util.c
@@ -185,6 +185,8 @@ static char* _media_thumb_mmc_get_path(uid_t uid)
grpinfo = getgrnam("users");
if(grpinfo == NULL) {
thumb_err("getgrnam(users) returns NULL !");
+ if(result_psswd)
+ free(result_psswd);
return NULL;
}
}
@@ -223,6 +225,8 @@ static char* _media_thumb_phone_get_path(uid_t uid)
grpinfo = getgrnam("users");
if(grpinfo == NULL) {
thumb_err("getgrnam(users) returns NULL !");
+ if(result_psswd)
+ free(result_psswd);
return NULL;
}
}
@@ -283,6 +287,8 @@ int _media_thumb_get_hash_name(const char *file_full_path,
ret_len =
snprintf(thumb_hash_path, max_thumb_path - 1, "%s/.%s-%s.jpg",
thumb_dir, file_ext, hash_name);
+ if(thumb_dir)
+ free(thumb_dir);
if (ret_len < 0) {
thumb_err("Error when snprintf");
return -1;