From 992f2ca7b58a9164b8a77e962d37b315947bace2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 29 Nov 2013 15:43:45 +0000 Subject: [PATCH] input-device: Guard against double free Dispose() may be called more than once, so calling g_free directly on the device name is unsafe. Instead, use g_clear_pointer() to make sure we don't attempt to free the memory again. https://bugzilla.gnome.org/show_bug.cgi?id=719563 --- clutter/clutter-input-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/clutter-input-device.c b/clutter/clutter-input-device.c index a81b84b67..6fe05b057 100644 --- a/clutter/clutter-input-device.c +++ b/clutter/clutter-input-device.c @@ -81,7 +81,7 @@ clutter_input_device_dispose (GObject *gobject) { ClutterInputDevice *device = CLUTTER_INPUT_DEVICE (gobject); - g_free (device->device_name); + g_clear_pointer (&device->device_name, g_free); if (device->associated != NULL) {