From 1452a975ecae14299fb27d41522dfd32305481ce Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 13 Apr 2022 14:21:32 +0100 Subject: [PATCH] trivial: Fix a small memory leak on db open failure Conflict:Using g_autofree will make the testcase fail, so here we use sqlite3_free to free the memory Reference:https://github.com/hughsie/colord/commit/1452a975ecae14299fb27d41522dfd32305481ce --- src/cd-profile-db.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cd-profile-db.c b/src/cd-profile-db.c index 5661d09..d6361ac 100644 --- a/src/cd-profile-db.c +++ b/src/cd-profile-db.c @@ -87,6 +87,7 @@ cd_profile_db_load (CdProfileDb *pdb, "uid INTEGER," "value TEXT," "PRIMARY KEY (profile_id, property, uid));"; + sqlite3_free (error_msg); sqlite3_exec (priv->db, statement, NULL, NULL, NULL); } return TRUE; -- 2.33.0