[gnome-bluetooth/wip/hadess/fix-memory-leaks: 1/2] settings-widget: Fix some memory leaks
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/fix-memory-leaks: 1/2] settings-widget: Fix some memory leaks
- Date: Thu, 21 Nov 2019 14:52:04 +0000 (UTC)
commit cee657daba2c8a4bdbf06448c18d90195d1b30e1
Author: Bastien Nocera <hadess hadess net>
Date: Thu Nov 21 15:48:11 2019 +0100
settings-widget: Fix some memory leaks
Spotted by Mohammed Sadiq <sadiq sadiqpk org>
lib/bluetooth-settings-widget.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index d3a54b54..2f5b7403 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1347,7 +1347,7 @@ default_adapter_changed (BluetoothClient *client,
BluetoothSettingsWidget *self)
{
BluetoothSettingsWidgetPrivate *priv = BLUETOOTH_SETTINGS_WIDGET_GET_PRIVATE (self);
- char *default_adapter;
+ g_autofree char *default_adapter = NULL;
g_object_get (priv->client, "default-adapter", &default_adapter, NULL);
@@ -1687,7 +1687,8 @@ row_changed_cb (GtkTreeModel *tree_model,
path = g_object_get_data (G_OBJECT (l->data), "object-path");
if (g_str_equal (object_path, path)) {
- char *name, *bdaddr;
+ g_autofree char *name = NULL;
+ g_autofree char *bdaddr = NULL;
BluetoothType type;
gboolean paired, trusted, connected, legacy_pairing;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]