From 548ae991a1f1dec3d2d4f43c440fe931bcf1e6f6 Mon Sep 17 00:00:00 2001 From: "pr.jung" Date: Wed, 13 Feb 2019 16:43:57 +0900 Subject: [PATCH] Remove resource leak Change-Id: If9959d9b79061f9c0042a57174a95bdff2898c37 Signed-off-by: pr.jung --- src/storage-inhouse.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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, -- 2.7.4