From f6c37829e52d195624ca9d6b79ff688586d0c86a Mon Sep 17 00:00:00 2001 From: Seungha Son Date: Mon, 15 Jan 2018 15:10:13 +0900 Subject: [PATCH] Fix memory leak Signed-off-by: Seungha Son Change-Id: I0070ce7f7f32149eece67da17f0ec1fbf4c0c111 --- src/notification_noti.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/notification_noti.c b/src/notification_noti.c index 4fc8dee..ea675dd 100755 --- a/src/notification_noti.c +++ b/src/notification_noti.c @@ -610,6 +610,9 @@ static int _get_notification(char *query_where, notification_h noti) } err: + if (query) + sqlite3_free(query); + if (stmt) sqlite3_finalize(stmt); @@ -693,6 +696,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) -- 2.7.4