From: Seungha Son Date: Mon, 15 Jan 2018 06:10:13 +0000 (+0900) Subject: Fix memory leak X-Git-Tag: submit/tizen_4.0/20180119.021335~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c04aa6486dda92d209a4a924ee2fa496d58e38f;p=platform%2Fcore%2Fapi%2Fnotification.git Fix memory leak Signed-off-by: Seungha Son Change-Id: I0070ce7f7f32149eece67da17f0ec1fbf4c0c111 --- diff --git a/src/notification_noti.c b/src/notification_noti.c index f2919fb2..6d36e0a8 100755 --- a/src/notification_noti.c +++ b/src/notification_noti.c @@ -607,6 +607,9 @@ static int _get_notification(char *query_where, notification_h noti) } err: + if (query) + sqlite3_free(query); + if (stmt) sqlite3_finalize(stmt); @@ -691,6 +694,9 @@ err: if (db != NULL) notification_db_close(&db); + if (query) + sqlite3_free(query); + return ret; } int notification_noti_set_tag(const char *tag, char *value, char *buf, int buf_len)