summaryrefslogtreecommitdiffstats
path: root/gtk/src/plist.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-08 00:24:11 +0000
committerjstebbins <[email protected]>2008-09-08 00:24:11 +0000
commitee19debd964cbd40df6097f34be0076162700550 (patch)
treeca17cbdbaf7a1076e251528196bfc0b610611a83 /gtk/src/plist.c
parent6ade707e8ed615708c3eaa5a0d282c3936fe825a (diff)
LinGui: fix memory issues found by valgrind
one uninitialized variable one missing free one malloc that's 1 byte too small git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1676 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/plist.c')
-rw-r--r--gtk/src/plist.c2
1 files changed, 1 insertions, 1 deletions
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);