summaryrefslogtreecommitdiffstats
path: root/gtk/src
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2016-10-27 12:51:09 -0700
committerJohn Stebbins <[email protected]>2016-10-28 08:51:59 -0700
commit202fccd7191e429e2e5a405eb11c6ec90021d51a (patch)
treee5fc3c39048f88e3d00487e3877e3b7ad6dc9658 /gtk/src
parent60c57a3e809a2d3ae42f38be89ef8e6dbfa5e16c (diff)
LinGui: fix use of freed pointer
Diffstat (limited to 'gtk/src')
-rw-r--r--gtk/src/callbacks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index 051a21dd2..9183e0cb8 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -4424,13 +4424,13 @@ ghb_is_cd(GDrive *gd)
return FALSE;
udd = g_udev_client_query_by_device_file(udev_ctx, device);
- g_free(device);
-
if (udd == NULL)
{
g_message("udev: Failed to lookup device %s", device);
+ g_free(device);
return FALSE;
}
+ g_free(device);
gint val;
val = g_udev_device_get_property_as_int(udd, "ID_CDROM_DVD");