[gnome-session] GsmSystemd: use free() on string returned from libsystemd, not g_free()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] GsmSystemd: use free() on string returned from libsystemd, not g_free()
- Date: Mon, 12 Nov 2012 08:26:02 +0000 (UTC)
commit c95bb1335a8e6f56f85b3803b9d2427661c05639
Author: Colin Walters <walters verbum org>
Date: Wed Nov 7 07:50:16 2012 -0500
GsmSystemd: use free() on string returned from libsystemd, not g_free()
Doesn't matter now, but it may sometime in the future. Also, it's
just good to stay on one's toes in C about what kinds of pointers need
to be freed with which function.
https://bugzilla.gnome.org/show_bug.cgi?id=687821
gnome-session/gsm-systemd.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnome-session/gsm-systemd.c b/gnome-session/gsm-systemd.c
index 417bb60..016a85b 100644
--- a/gnome-session/gsm-systemd.c
+++ b/gnome-session/gsm-systemd.c
@@ -52,7 +52,7 @@
struct _GsmSystemdPrivate
{
GDBusProxy *sd_proxy;
- gchar *session_id;
+ char *session_id;
gchar *session_path;
GSList *inhibitors;
@@ -81,7 +81,7 @@ gsm_systemd_finalize (GObject *object)
GsmSystemd *systemd = GSM_SYSTEMD (object);
g_clear_object (&systemd->priv->sd_proxy);
- g_free (systemd->priv->session_id);
+ free (systemd->priv->session_id);
g_free (systemd->priv->session_path);
if (systemd->priv->inhibitors != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]