Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
colord.35608
colord-CVE-2021-42523.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File colord-CVE-2021-42523.patch of Package colord.35608
From adf41f36cf7214d7d6fa8d528b74eba47c377405 Mon Sep 17 00:00:00 2001 From: Zero0one1 <arya_lee@qq.com> Date: Fri, 2 Apr 2021 16:45:56 +0800 Subject: [PATCH] Fix a small memory leak in sqlite3_exec() Fixes https://github.com/hughsie/colord/issues/110 --- src/cd-device-db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cd-device-db.c b/src/cd-device-db.c index a212c83..3ae44ef 100644 --- a/src/cd-device-db.c +++ b/src/cd-device-db.c @@ -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," -- 2.37.3 From 1452a975ecae14299fb27d41522dfd32305481ce Mon Sep 17 00:00:00 2001 From: Richard Hughes <richard@hughsie.com> Date: Wed, 13 Apr 2022 14:21:32 +0100 Subject: [PATCH] trivial: Fix a small memory leak on db open failure --- src/cd-mapping-db.c | 3 +-- src/cd-profile-db.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cd-mapping-db.c b/src/cd-mapping-db.c index 7a3df35..996f07e 100644 --- a/src/cd-mapping-db.c +++ b/src/cd-mapping-db.c @@ -67,7 +67,7 @@ cd_mapping_db_open (CdMappingDb *mdb, GError **error) { CdMappingDbPrivate *priv = GET_PRIVATE (mdb); - gchar *error_msg = NULL; + g_autofree gchar *error_msg = NULL; gint rc; g_autofree gchar *path = NULL; @@ -116,7 +116,6 @@ cd_mapping_db_open (CdMappingDb *mdb, CD_CLIENT_ERROR_INTERNAL, "Cannot open mapping database: %s", error_msg); - sqlite3_free (error_msg); return FALSE; } } diff --git a/src/cd-profile-db.c b/src/cd-profile-db.c index 5661d09..57ab864 100644 --- a/src/cd-profile-db.c +++ b/src/cd-profile-db.c @@ -48,7 +48,7 @@ cd_profile_db_load (CdProfileDb *pdb, { CdProfileDbPrivate *priv = GET_PRIVATE (pdb); const gchar *statement; - gchar *error_msg = NULL; + g_autofree gchar *error_msg = NULL; gint rc; g_autofree gchar *path = NULL; -- 2.37.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor