aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc
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/include/openbsc
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/include/openbsc')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 3eba70d65..86134bec7 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -356,10 +356,7 @@ void bsc_close_connection(struct bsc_connection *);
const char *bsc_con_type_to_string(int type);
-/**
- * parse the given message into the above structure
- */
-struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg);
+int bsc_nat_parse(struct msgb *msg, struct bsc_nat_parsed *parsed);
/**
* filter based on IP Access header in both directions