Fix resource leaks 38/172138/1
authorSemun Lee <semun.lee@samsung.com>
Mon, 12 Mar 2018 06:41:04 +0000 (15:41 +0900)
committerSemun Lee <semun.lee@samsung.com>
Mon, 12 Mar 2018 06:41:04 +0000 (15:41 +0900)
Change-Id: I04c3346623b44b0e4a86445c63159c86a5a9bf9d
Signed-off-by: Semun Lee <semun.lee@samsung.com>
src/notification.c
src/notification_noti.c

index d08b661204981d10df279634fd1ae279c09c5653..d49408faf32a309db50de42693f68e6d81fe4621 100755 (executable)
@@ -142,6 +142,10 @@ EXPORT_API int notification_set_image(notification_h noti,
                bundle_add_str(priv_b, buf_key, priv_path);
                noti->b_priv_image_path = priv_b;
        }
+
+       if (priv_path)
+               free(priv_path);
+
        return NOTIFICATION_ERROR_NONE;
 }
 
index a799fb1c8a865ebd6cae4de8270b927e499220cb..2465f0192fb1fadde10701484bf06169aa7887b1 100755 (executable)
@@ -973,6 +973,7 @@ static int _check_text_input(notification_h noti)
                        ERR("Event handler for text_input is not set");
                        return -1;
                }
+               app_control_destroy(app_control);
        }
 
        return NOTIFICATION_ERROR_NONE;