summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c1
-rw-r--r--gtk/src/main.c1
-rw-r--r--gtk/src/plist.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index b185d4af4..453fa693a 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -3864,6 +3864,7 @@ ghb_is_cd(GDrive *gd)
device = g_drive_get_identifier(gd, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
halDrive = libhal_drive_from_device_file (hal_ctx, device);
dtype = libhal_drive_get_type(halDrive);
+ libhal_drive_free(halDrive);
g_free(device);
return (dtype == LIBHAL_DRIVE_TYPE_CDROM);
}
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 6cf76ae1c..02012b9bd 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -513,6 +513,7 @@ main (int argc, char *argv[])
ud->queue = NULL;
ud->current_job = NULL;
ud->current_dvd_device = NULL;
+ ud->dont_clear_presets = FALSE;
// Redirect stderr to the activity window
IoRedirect(ud);
// Enable events that alert us to media change events
diff --git a/gtk/src/plist.c b/gtk/src/plist.c
index 93178b370..b0a39c31b 100644
--- a/gtk/src/plist.c
+++ b/gtk/src/plist.c
@@ -393,7 +393,7 @@ ghb_plist_parse_file(FILE *fd)
fseek(fd, 0, SEEK_END);
size = ftell(fd);
fseek(fd, 0, SEEK_SET);
- buffer = g_malloc(size);
+ buffer = g_malloc(size+1);
size = fread(buffer, 1, size, fd);
buffer[size] = 0;
gval = ghb_plist_parse(buffer, (gssize)size);