Skip to contentSkip to conversation

Fix g_isi_client_destroy segfault

PATCH In review Marko Saukko 2 participants 2 messages Jul 9, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix g_isi_client_destroy segfault

If null pointer is given to g_isi_client_destroy it segfaults. Currently this is happening when signal 15 is sent to ofonod.

---

gisi/client.c +2 -0
index b12dc85..a12640d 100644
@@ -143,6 +143,8 @@ void g_isi_client_destroy(GIsiClient *client)
 {
        unsigned id;
 
+       if (!client)
+               return;
        g_source_remove(client->source);
        for (id = 0; id < 256; id++)
                if (client->timeout[id] > 0)
#1 lore raw
Quoted 2 lines · Marko Saukko

If null pointer is given to g_isi_client_destroy it segfaults. Currently this is happening when signal 15 is sent to ofonod.

I pushed a patch to isimodem.c that should fix this, as well as another problem related to the current lack of support for multiple parallel ISI modems in Phonet.

Thanks for reporting.

Cheers,
Aki