nat: Always initialize the out pointer...

Always initialize the pointer to a invalid value in case
we encounter a parsing error or such.
This commit is contained in:
Holger Hans Peter Freyther
2010-04-18 02:41:20 +08:00
parent a7c144888d
commit 5e86095364

View File

@@ -112,6 +112,8 @@ struct bsc_connection *bsc_nat_find_bsc(struct bsc_nat *nat, struct msgb *msg, i
struct tlv_parsed tp;
int i = 0;
*lac_out = -1;
if (!msg->l3h || msgb_l3len(msg) < 3) {
LOGP(DNAT, LOGL_ERROR, "Paging message is too short.\n");
return NULL;