From 6a54706b39e41b47edb3186e5ac6151007a88626 Mon Sep 17 00:00:00 2001 From: Zero0one1 Date: Thu, 1 Apr 2021 21:16:56 +0800 Subject: [PATCH] Fix the potential memory leakage in issue https://github.com/hughsie/colord/issues/110 by setting the 5th paramerter of sqlite3_exec() to NULL Conflict:NA Reference:https://github.com/hughsie/colord/pull/130/commits/6a54706b39e41b47edb3186e5ac6151007a88626 --- src/cd-device-db.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cd-device-db.c b/src/cd-device-db.c index a212c83d..8da1a4a9 100644 --- a/src/cd-device-db.c +++ b/src/cd-device-db.c @@ -79,7 +79,7 @@ cd_device_db_load (CdDeviceDb *ddb, /* check devices */ rc = sqlite3_exec (priv->db, "SELECT * FROM devices LIMIT 1", - NULL, NULL, &error_msg); + NULL, NULL, NULL); if (rc != SQLITE_OK) { g_debug ("CdDeviceDb: creating table to repair: %s", error_msg); sqlite3_free (error_msg); @@ -91,7 +91,7 @@ cd_device_db_load (CdDeviceDb *ddb, /* check properties version 2 */ rc = sqlite3_exec (priv->db, "SELECT * FROM properties_v2 LIMIT 1", - NULL, NULL, &error_msg); + NULL, NULL, NULL); if (rc != SQLITE_OK) { statement = "CREATE TABLE properties_v2 (" "device_id TEXT,"