From: Jihoon Kim Date: Mon, 18 Mar 2019 05:10:20 +0000 (+0900) Subject: Fix memory leak in destroy APIs X-Git-Tag: submit/tizen/20190318.014732~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F201591%2F1;p=platform%2Fcore%2Fuifw%2Fautofill.git Fix memory leak in destroy APIs Change-Id: I36aacc0eed5ccc4e1014b671e9783027120accd7 Signed-off-by: Jihoon Kim --- diff --git a/client/autofill.c b/client/autofill.c index e8985d3..e132663 100644 --- a/client/autofill.c +++ b/client/autofill.c @@ -315,6 +315,8 @@ EXPORT_API int autofill_destroy(autofill_h ah) ah->rpc_h = NULL; } + free(ah); + return AUTOFILL_ERROR_NONE; } @@ -466,4 +468,4 @@ EXPORT_API int autofill_error_info_unset_received_cb(autofill_h ah) ah->autofill_error_info_data = NULL; return AUTOFILL_ERROR_NONE; -} \ No newline at end of file +} diff --git a/common/autofill_item.c b/common/autofill_item.c index 8a20806..f90b9cc 100644 --- a/common/autofill_item.c +++ b/common/autofill_item.c @@ -51,7 +51,6 @@ EXPORT_API int autofill_item_create(autofill_item_h *it) return AUTOFILL_ERROR_NONE; } -// Destroy autofill info list item EXPORT_API int autofill_item_destroy(autofill_item_h it) { if (!it) diff --git a/manager/autofill_manager.c b/manager/autofill_manager.c index e2becfc..b452824 100644 --- a/manager/autofill_manager.c +++ b/manager/autofill_manager.c @@ -133,6 +133,8 @@ EXPORT_API int autofill_manager_destroy(autofill_manager_h amh) amh->rpc_h = NULL; } + free(amh); + return AUTOFILL_ERROR_NONE; }