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 35c0261..fd12faa 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 73e7f3f..e25cb0d 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 1d5e4f1..e9e8d88 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 fcc137e..2c936b7 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;