Change-Id: I496932086d15704878ba0754a5b6d8ba6b7281df
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
grpinfo = getgrnam("users");
if(grpinfo == NULL) {
thumb_err("getgrnam(users) returns NULL !");
+ if(result_psswd)
+ free(result_psswd);
return NULL;
}
}
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);
}
grpinfo = getgrnam("users");
if(grpinfo == NULL) {
thumb_err("getgrnam(users) returns NULL !");
+ if(result_psswd)
+ free(result_psswd);
return NULL;
}
}
grpinfo = getgrnam("users");
if(grpinfo == NULL) {
thumb_err("getgrnam(users) returns NULL !");
+ if(result_psswd)
+ free(result_psswd);
return NULL;
}
}
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;