aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-05-01 22:30:26 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-05-16 17:19:42 +0200
commitc44cbbf839dcff3f7b83ca3a051854e52fe88e40 (patch)
tree5ec3794a6ddaaf8bc52ef6c0d031a38fc4098740 /openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c
parent7ab9a9eb50076e98cae0c978622d7be99d9d1b02 (diff)
nat: Allocate bsc_nat_parsed on the stack instead of heap
There's no real need to allocate it using talloc. Allocating it on the stack simplifies the code, avoids mem leaks and makes it faster. Change-Id: I66c44890952339f15131081e2f629a2824b6d3ba
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c
index e7c387c22..1dd2ada0f 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_rewrite.c
@@ -618,8 +618,6 @@ struct msgb *bsc_nat_rewrite_msg(struct bsc_nat *nat, struct msgb *msg, struct b
ipa_prepend_header(sccp, IPAC_PROTO_SCCP);
- /* the parsed hangs off from msg but it needs to survive */
- talloc_steal(sccp, parsed);
msgb_free(msg);
return sccp;
}