Remove g_free macro 42/224342/1
authorjiyong.min <jiyong.min@samsung.com>
Mon, 10 Feb 2020 04:14:49 +0000 (13:14 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Mon, 10 Feb 2020 04:14:49 +0000 (13:14 +0900)
Change-Id: I7d477fdcecff5b3026dd2e68919aded5fc71d473

include/media_info_private.h
include_product/media_info_private.h
src/media_content.c
src/media_info.c

index 35c02616250d48e0abdffee21b3424b204a077bd..fd12faa61fa3473928b52d42cce81c76224d2c98 100755 (executable)
@@ -59,7 +59,6 @@ extern "C" {
 #define SAFE_STRLCPY(dst, src, n)      ((g_strlcpy(dst, src, n) < n) ? TRUE : FALSE)
 #define SAFE_STRLCAT(dst, src, n)      g_strlcat(dst, src, n);
 #define SAFE_FREE(src)         {if (src) {free(src); src = NULL; } }
-#define SAFE_G_FREE(src)               {if (src) {g_free(src); src = NULL; } }
 #define STRING_VALID(str)              ((str != NULL && strlen(str) > 0) ? TRUE : FALSE)
 #define SQLITE3_FINALIZE(x)    {if (x != NULL) sqlite3_finalize(x); }
 #define SQLITE3_SAFE_FREE(x)   {if (x != NULL) {sqlite3_free(x); x = NULL; } }
index 73e7f3fbbdf28e9b22f8098126450ba79fbd5cb8..e25cb0d30c55f48fc3d75f15ed0d2db6ee4aa06b 100755 (executable)
@@ -62,7 +62,6 @@ extern "C" {
 #define SAFE_STRLCPY(dst, src, n)      ((g_strlcpy(dst, src, n) < n) ? TRUE : FALSE)
 #define SAFE_STRLCAT(dst, src, n)      g_strlcat(dst, src, n);
 #define SAFE_FREE(src)         {if (src) {free(src); src = NULL; } }
-#define SAFE_G_FREE(src)               {if (src) {g_free(src); src = NULL; } }
 #define STRING_VALID(str)              ((str != NULL && strlen(str) > 0) ? TRUE : FALSE)
 #define SQLITE3_FINALIZE(x)    {if (x != NULL) sqlite3_finalize(x); }
 #define SQLITE3_SAFE_FREE(x)   {if (x != NULL) {sqlite3_free(x); x = NULL; } }
index 1d5e4f116d7305cf9090e7a728f323b574364f4f..e9e8d88fce41e9b0ba55abe89faa4f4987107541 100644 (file)
@@ -275,7 +275,7 @@ int media_content_scan_file(const char *path)
                /* This means this path has to be inserted or refreshed */
                folder_path = g_path_get_dirname(repl_path);
                ret = _media_util_check_ignore_dir(folder_path, &ignore_dir);
-               SAFE_G_FREE(folder_path);
+               g_free(folder_path);
 
                media_content_retvm_if(ignore_dir == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
                /* check feature */
index fcc137e04cd1f95aae9108a2bf0b596871b1d2a4..2c936b7e32cde5218dad26ab8545c7d08869fa35 100644 (file)
@@ -265,7 +265,7 @@ static int __media_info_check_file_validity(const char *path)
 
        folder_path = g_path_get_dirname(path);
        ret = _media_util_check_ignore_dir(folder_path, &ignore);
-       SAFE_G_FREE(folder_path);
+       g_free(folder_path);
        media_content_retvm_if(ignore == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
 
        return MEDIA_CONTENT_ERROR_NONE;