From: Mika Liljeberg Date: Wed, 10 Nov 2010 12:22:28 +0000 (+0200) Subject: gisi: fix crash bug in g_isi_remove_subscription X-Git-Tag: 0.36~43 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=39823fee142013f20b5db60ea4b555098f93c978;p=platform%2Fupstream%2Fofono.git gisi: fix crash bug in g_isi_remove_subscription --- diff --git a/gisi/client.c b/gisi/client.c index 8ab3dc9..8e41331 100644 --- a/gisi/client.c +++ b/gisi/client.c @@ -744,16 +744,19 @@ int g_isi_subscribe(GIsiClient *client, uint8_t type, */ void g_isi_remove_subscription(GIsiClient *client, uint8_t res, uint8_t type) { + void *ret; GIsiIndication *ind; unsigned int id = (res << 8) | type; if (!client) return; - ind = tdelete(&id, &client->inds.subs, g_isi_cmp); - if (!ind) + ret = tfind(&id, &client->inds.subs, g_isi_cmp); + if (!ret) return; + ind = *(GIsiIndication **)ret; + tdelete(ind, &client->inds.subs, g_isi_cmp); client->inds.count--; g_free(ind); }