From: Andrzej Zaborowski Date: Thu, 23 Dec 2010 04:39:39 +0000 (+0100) Subject: gisi: fix use of unitialised variable X-Git-Tag: 0.37~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9aeef28d38d6263cb10b54318512f5020f8f163;p=platform%2Fupstream%2Fofono.git gisi: fix use of unitialised variable Set no msg.version if it's not available. --- diff --git a/gisi/modem.c b/gisi/modem.c index ff06cf2..9fb4d34 100644 --- a/gisi/modem.c +++ b/gisi/modem.c @@ -293,7 +293,6 @@ static gboolean isi_callback(GIOChannel *channel, GIOCondition cond, msg.error = 0; msg.data = buf; msg.len = len; - msg.version = &mux->version; if (modem->trace != NULL) modem->trace(&msg, NULL); @@ -311,6 +310,8 @@ static gboolean isi_callback(GIOChannel *channel, GIOCondition cond, return TRUE; } + msg.version = &mux->version; + if (g_isi_msg_id(&msg) == COMMON_MESSAGE) common_message_decode(mux, &msg);