aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/e1_config.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-06-20 22:36:41 +0200
committerHarald Welte <laforge@gnumonks.org>2009-06-20 22:36:41 +0200
commit2cf161be08795be4a074ba2b50fdd81ad1f4c35e (patch)
tree3d1be58cd835c41e74f2a0d6a293085da5389777 /openbsc/src/e1_config.c
parent879dc971ff61c8405a9bdb505b24ec66296ecb4f (diff)
introduce talloc all over OpenBSC
Diffstat (limited to 'openbsc/src/e1_config.c')
-rw-r--r--openbsc/src/e1_config.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/openbsc/src/e1_config.c b/openbsc/src/e1_config.c
index fc23b55e1..abc30402f 100644
--- a/openbsc/src/e1_config.c
+++ b/openbsc/src/e1_config.c
@@ -8,6 +8,7 @@
#include <openbsc/trau_frame.h>
#include <openbsc/trau_mux.h>
#include <openbsc/misdn.h>
+#include <openbsc/talloc.h>
#define SAPI_L2ML 0
#define SAPI_OML 62
@@ -24,7 +25,7 @@ int e1_config(struct gsm_bts *bts, int cardnr, int release_l2)
struct e1inp_ts *sign_ts;
struct e1inp_sign_link *oml_link, *rsl_link;
- line = malloc(sizeof(*line));
+ line = talloc(tall_bsc_ctx, struct e1inp_line);
if (!line)
return -ENOMEM;
memset(line, 0, sizeof(*line));
@@ -79,9 +80,9 @@ int ia_config_connect(struct gsm_bts *bts, struct sockaddr_in *sin)
struct e1inp_ts *sign_ts, *rsl_ts;
struct e1inp_sign_link *oml_link, *rsl_link;
- line = malloc(sizeof(*line));
+ line = talloc(tall_bsc_ctx, struct e1inp_line);
if (!line)
- return NULL;
+ return -ENOMEM;
memset(line, 0, sizeof(*line));
/* create E1 timeslots for signalling and TRAU frames */