From: Manu Tiwari Date: Wed, 1 May 2019 12:51:56 +0000 (+0530) Subject: [ITC][notification][NonACR][TFDF-1814, TFDF-1815, TFDF-1816, TFDF-1817, TFDF-1818... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5fab3cc9a64b16fd97d15ffa702e9862e30f7974;p=test%2Ftct%2Fnative%2Fapi.git [ITC][notification][NonACR][TFDF-1814, TFDF-1815, TFDF-1816, TFDF-1817, TFDF-1818, TFDF-1819, TFDF-1820 heap-use-after-free asan bug fix] Change-Id: I74a79276e50cbbd0b82dcddb8067dd146a25c788 Signed-off-by: Manu Tiwari --- diff --git a/src/itc/notification/ITs-notification.c b/src/itc/notification/ITs-notification.c index ac9939a51..af9fe7fde 100755 --- a/src/itc/notification/ITs-notification.c +++ b/src/itc/notification/ITs-notification.c @@ -230,11 +230,9 @@ int ITc_notification_free_p(void) FPRINTF("[Line : %d][%s] notification_create failed for notification_type_e enum value = %d, returns null handle vale\\n", __LINE__, API_NAMESPACE, noti_type[enum_counter]); return 1; } - - eRetNotiErr = notification_free(g_NotificationHandle); - PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, eRetNotiErr, "notification_free", NotificationGetError(eRetNotiErr), notification_delete(g_NotificationHandle);); - notification_delete(g_NotificationHandle); + eRetNotiErr = notification_free(g_NotificationHandle); + PRINT_RESULT_CLEANUP(NOTIFICATION_ERROR_NONE, eRetNotiErr, "notification_free", NotificationGetError(eRetNotiErr), FREE_MEMORY(g_NotificationHandle)); } return 0; }