Diff between 01333078f591969f885bb94187a91d35e8fd5388 and 67a2c40e65703cccd9f0706be70cac04693677f5

Changed Files

File Additions Deletions Status
gobex/gobex-packet.c +6 -1 modified
gobex/gobex.c +6 -1 modified

Full Patch

diff --git a/gobex/gobex-packet.c b/gobex/gobex-packet.c
index cd5c131..a89f5b6 100644
--- a/gobex/gobex-packet.c
+++ b/gobex/gobex-packet.c
@@ -260,6 +260,11 @@ GObexPacket *g_obex_packet_new(guint8 opcode, gboolean final,
 	return pkt;
 }
 
+static void header_free(void *data, void *user_data)
+{
+	g_obex_header_free(data);
+}
+
 void g_obex_packet_free(GObexPacket *pkt)
 {
 	g_obex_debug(G_OBEX_DEBUG_PACKET, "opcode 0x%02x", pkt->opcode);
@@ -273,7 +278,7 @@ void g_obex_packet_free(GObexPacket *pkt)
 		break;
 	}
 
-	g_slist_foreach(pkt->headers, (GFunc) g_obex_header_free, NULL);
+	g_slist_foreach(pkt->headers, header_free, NULL);
 	g_slist_free(pkt->headers);
 	g_free(pkt);
 }
diff --git a/gobex/gobex.c b/gobex/gobex.c
index 0e5817e..ef5355a 100644
--- a/gobex/gobex.c
+++ b/gobex/gobex.c
@@ -1508,6 +1508,11 @@ GObex *g_obex_ref(GObex *obex)
 	return obex;
 }
 
+static void tx_queue_free(void *data, void *user_data)
+{
+	pending_pkt_free(data);
+}
+
 void g_obex_unref(GObex *obex)
 {
 	int refs;
@@ -1521,7 +1526,7 @@ void g_obex_unref(GObex *obex)
 
 	g_slist_free_full(obex->req_handlers, g_free);
 
-	g_queue_foreach(obex->tx_queue, (GFunc) pending_pkt_free, NULL);
+	g_queue_foreach(obex->tx_queue, tx_queue_free, NULL);
 	g_queue_free(obex->tx_queue);
 
 	if (obex->io != NULL)