summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christophe Fergeau2011-03-16 23:21:27 +0100
committerGravatar Martin Szulecki2011-03-16 23:24:00 +0100
commit00df38d1b370584ed07e2d1b9179df4d4178b0d3 (patch)
tree3029adb2fa9fdbe65d0d64a1a3f7a4a5659f0efc
parent5e44b6bfc0ba2ee36c594caf1999eaf5d26133ed (diff)
downloadlibplist-00df38d1b370584ed07e2d1b9179df4d4178b0d3.tar.gz
libplist-00df38d1b370584ed07e2d1b9179df4d4178b0d3.tar.bz2
Plugging memory leak in write_unicode
-rw-r--r--src/bplist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c
index 794d04f..82d1813 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -761,6 +761,7 @@ static void write_unicode(GByteArray * bplist, gunichar2 * val, uint64_t size)
for (i = 0; i < size; i++)
byte_convert(buff + i * sizeof(gunichar2), sizeof(gunichar2));
write_raw_data(bplist, BPLIST_UNICODE, buff, size);
+ free(buff);
}
static void write_array(GByteArray * bplist, GNode * node, GHashTable * ref_table, uint8_t dict_param_size)