Fix memory leak 59/167059/2
authorSeungha Son <seungha.son@samsung.com>
Mon, 15 Jan 2018 06:10:13 +0000 (15:10 +0900)
committerSeungha Son <seungha.son@samsung.com>
Mon, 15 Jan 2018 07:05:00 +0000 (16:05 +0900)
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: I0070ce7f7f32149eece67da17f0ec1fbf4c0c111

src/notification_noti.c

index f2919fb25af848c0fdff7534afd39c27cabf1061..6d36e0a8fb489514bfdcba4d79e20b11704ecf75 100755 (executable)
@@ -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)