Fix memory leak in destroy APIs 91/201591/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 18 Mar 2019 05:10:20 +0000 (14:10 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 18 Mar 2019 05:10:20 +0000 (14:10 +0900)
Change-Id: I36aacc0eed5ccc4e1014b671e9783027120accd7
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
client/autofill.c
common/autofill_item.c
manager/autofill_manager.c

index e8985d3..e132663 100644 (file)
@@ -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
+}
index 8a20806..f90b9cc 100644 (file)
@@ -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)
index e2becfc..b452824 100644 (file)
@@ -133,6 +133,8 @@ EXPORT_API int autofill_manager_destroy(autofill_manager_h amh)
         amh->rpc_h = NULL;
     }
 
+    free(amh);
+
     return AUTOFILL_ERROR_NONE;
 }