aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-03-26 19:09:07 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-03-26 19:09:07 +0200
commit053e27528cf4da1f96bd5bf78c6982b73b790100 (patch)
treed067f0c7e5ccabbf034c668aeca081ab154e4df4
parent7fdfad2f5d2033c7eb008233768ce1c0638a6d55 (diff)
gsup_test_client: gsupc_read_cb: fix uninitialized value 'io'
-rw-r--r--src/libgsupclient/gsup_test_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libgsupclient/gsup_test_client.c b/src/libgsupclient/gsup_test_client.c
index add98e47a..03ba68e5a 100644
--- a/src/libgsupclient/gsup_test_client.c
+++ b/src/libgsupclient/gsup_test_client.c
@@ -217,7 +217,7 @@ static int op_type_by_gsup_msgt(enum osmo_gsup_message_type msg_type)
static int gsupc_read_cb(struct gsup_client *gsupc, struct msgb *msg)
{
struct osmo_gsup_message gsup_msg = {0};
- struct imsi_op *io;
+ struct imsi_op *io = NULL;
int rc;
DEBUGP(DLGSUP, "Rx GSUP %s\n", msgb_hexdump(msg));
@@ -237,14 +237,14 @@ static int gsupc_read_cb(struct gsup_client *gsupc, struct msgb *msg)
case IMSI_OP_SAI:
case IMSI_OP_LU:
io = imsi_op_find(gsup_msg.imsi, rc);
- if (!io)
- return -1;
break;
case IMSI_OP_ISD:
/* ISD is an inbound transaction */
io = imsi_op_alloc(g_gc, gsup_msg.imsi, IMSI_OP_ISD);
break;
}
+ if (!io)
+ return -1;
imsi_op_rx_gsup(io, &gsup_msg);
msgb_free(msg);