Fix DANGLING_POINTER.STAT 59/205559/1
authormk5004.lee <mk5004.lee@samsung.com>
Tue, 7 May 2019 10:27:15 +0000 (19:27 +0900)
committermk5004.lee <mk5004.lee@samsung.com>
Tue, 7 May 2019 10:27:15 +0000 (19:27 +0900)
Change-Id: I89332c2f491129263abb943892ff5a8c6e4a4fb0
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
notification/src/notification.c

index 698b15055be7db8b6846a0e97d425eb5f1be95d6..7ad2cde6a8d1fb3c777037e0b56adab67c1c1f05 100644 (file)
@@ -932,8 +932,10 @@ EXPORT_API int notification_set_sound(notification_h noti,
                        free(noti->sound_path);
                noti->sound_path = strdup(path);
 
-               if (noti->priv_sound_path != NULL)
+               if (noti->priv_sound_path != NULL) {
                        free(noti->priv_sound_path);
+                       noti->priv_sound_path = NULL;
+               }
 
                priv_path = notification_check_file_path_is_private(noti->pkg_id, path);
                if (priv_path)