aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-18 02:41:20 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-18 02:41:20 +0800
commit5e860953643f5adc884e2e4f681802765098cb4e (patch)
treeaf326fd2879ab5a75dd7d6abe1c6327dc8084cf7 /openbsc
parenta7c144888d5d815eb6a928d180df1b37c626a1c5 (diff)
nat: Always initialize the out pointer...
Always initialize the pointer to a invalid value in case we encounter a parsing error or such.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/nat/bsc_nat_utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_nat_utils.c b/openbsc/src/nat/bsc_nat_utils.c
index f2940a55c..290ee4eaa 100644
--- a/openbsc/src/nat/bsc_nat_utils.c
+++ b/openbsc/src/nat/bsc_nat_utils.c
@@ -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;