OSDN Git Service

gobex: Fix removing pending request timeout callback
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 4 Jul 2011 08:10:23 +0000 (11:10 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 4 Dec 2012 21:21:58 +0000 (22:21 +0100)
gobex/gobex.c

index 8961625..e684628 100644 (file)
@@ -128,7 +128,12 @@ static void pending_pkt_free(struct pending_pkt *p)
 {
        if (p->obex != NULL)
                g_obex_unref(p->obex);
+
+       if (p->timeout_id > 0)
+               g_source_remove(p->timeout_id);
+
        g_obex_packet_free(p->pkt);
+
        g_free(p);
 }