From: pr.jung Date: Wed, 13 Feb 2019 07:43:57 +0000 (+0900) Subject: Remove resource leak X-Git-Tag: accepted/tizen/unified/20190214.060737^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=548ae991a1f1dec3d2d4f43c440fe931bcf1e6f6;p=platform%2Fcore%2Fsystem%2Flibstorage.git Remove resource leak Change-Id: If9959d9b79061f9c0042a57174a95bdff2898c37 Signed-off-by: pr.jung --- diff --git a/src/storage-inhouse.c b/src/storage-inhouse.c index 5a9ca1f..2ec6f08 100755 --- a/src/storage-inhouse.c +++ b/src/storage-inhouse.c @@ -266,6 +266,10 @@ API int storage_request_mount_mmc(struct mmc_contents *mmc_data) ret = storage_get_primary_sdcard(&id, &path); if (ret != STORAGE_ERROR_NONE) return ret; +//LCOV_EXCL_START System Error + if (path) + free(path); +//LCOV_EXCL_STOP ret = dbus_method_async_with_reply_var(STORAGE_EXT_BUS_NAME, STORAGE_EXT_PATH_MANAGER, @@ -331,6 +335,10 @@ API int storage_request_unmount_mmc(struct mmc_contents *mmc_data, int option) ret = storage_get_primary_sdcard(&id, &path); if (ret != STORAGE_ERROR_NONE) return ret; +//LCOV_EXCL_START System Error + if (path) + free(path); +//LCOV_EXCL_STOP ret = dbus_method_async_with_reply_var(STORAGE_EXT_BUS_NAME, STORAGE_EXT_PATH_MANAGER, @@ -401,6 +409,10 @@ API int storage_format_mmc(struct mmc_contents *mmc_data, int option) ret = storage_get_primary_sdcard(&id, &path); if (ret != STORAGE_ERROR_NONE) return ret; +//LCOV_EXCL_START System Error + if (path) + free(path); +//LCOV_EXCL_STOP ret = dbus_method_async_with_reply_var(STORAGE_EXT_BUS_NAME, STORAGE_EXT_PATH_MANAGER,