libpurple/protocols/oscar/tlv.c

changeset 31275
69424db9c7ed
parent 30676
e6e19d26597c
child 34304
faf0414a8b51
child 35977
9b7b48f446f4
--- a/libpurple/protocols/oscar/tlv.c	Tue Dec 28 05:54:04 2010 +0000
+++ b/libpurple/protocols/oscar/tlv.c	Tue Dec 28 05:57:57 2010 +0000
@@ -400,6 +400,7 @@
  */
 int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint64 caps, const char *mood)
 {
+	int len;
 	ByteStream bs;
 	guint32 bs_size;
 	guint8 *data;
@@ -417,7 +418,11 @@
 	if (data != NULL)
 		byte_stream_putraw(&bs, data, 16);
 
-	return aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), bs.data);
+	len = aim_tlvlist_add_raw(list, type, byte_stream_curpos(&bs), bs.data);
+
+	byte_stream_destroy(&bs);
+
+	return len;
 }
 
 /**

mercurial