diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-06-20 22:36:41 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-06-20 22:36:41 +0200 |
commit | 2cf161be08795be4a074ba2b50fdd81ad1f4c35e (patch) | |
tree | 3d1be58cd835c41e74f2a0d6a293085da5389777 /openbsc/src/e1_input.c | |
parent | 879dc971ff61c8405a9bdb505b24ec66296ecb4f (diff) |
introduce talloc all over OpenBSC
Diffstat (limited to 'openbsc/src/e1_input.c')
-rw-r--r-- | openbsc/src/e1_input.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c index 034bd9723..84dde9047 100644 --- a/openbsc/src/e1_input.c +++ b/openbsc/src/e1_input.c @@ -51,6 +51,7 @@ #include <openbsc/subchan_demux.h> #include <openbsc/trau_frame.h> #include <openbsc/trau_mux.h> +#include <openbsc/talloc.h> #define NUM_E1_TS 32 @@ -60,6 +61,8 @@ LLIST_HEAD(e1inp_driver_list); /* list of all E1 lines */ LLIST_HEAD(e1inp_line_list); +static void *tall_sigl_ctx; + /* to be implemented, e.g. by bsc_hack.c */ void input_event(int event, enum e1inp_sign_type type, struct gsm_bts_trx *trx); @@ -366,7 +369,11 @@ e1inp_sign_link_create(struct e1inp_ts *ts, enum e1inp_sign_type type, if (ts->type != E1INP_TS_TYPE_SIGN) return NULL; - link = malloc(sizeof(*link)); + if (!tall_sigl_ctx) + tall_sigl_ctx = talloc_named_const(tall_bsc_ctx, 1, + "e1inp_sign_link"); + + link = talloc(tall_sigl_ctx, struct e1inp_sign_link); if (!link) return NULL; |