[gnome-control-center] info: Initialize autoptr variables with NULL
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] info: Initialize autoptr variables with NULL
- Date: Thu, 12 Aug 2021 15:06:47 +0000 (UTC)
commit 5ba4bc0fa977aa584034766f86e4cc4d36b3c1c8
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Tue Aug 10 16:45:45 2021 +0530
info: Initialize autoptr variables with NULL
So as to avoid invalid free
panels/info-overview/cc-info-overview-panel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/panels/info-overview/cc-info-overview-panel.c b/panels/info-overview/cc-info-overview-panel.c
index d9d2fa60f..9ee9d2910 100644
--- a/panels/info-overview/cc-info-overview-panel.c
+++ b/panels/info-overview/cc-info-overview-panel.c
@@ -771,9 +771,9 @@ does_gnome_software_allow_updates (void)
{
const gchar *schema_id = "org.gnome.software";
GSettingsSchemaSource *source;
- g_autoptr(GSettingsSchema) schema;
- g_autoptr(GSettings) settings;
-
+ g_autoptr(GSettingsSchema) schema = NULL;
+ g_autoptr(GSettings) settings = NULL;
+
source = g_settings_schema_source_get_default ();
if (source == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]