diff options
Diffstat (limited to 'openbsc/src/e1_input.c')
-rw-r--r-- | openbsc/src/e1_input.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c index 2d0c1340f..7531755c2 100644 --- a/openbsc/src/e1_input.c +++ b/openbsc/src/e1_input.c @@ -370,10 +370,6 @@ e1inp_sign_link_create(struct e1inp_ts *ts, enum e1inp_sign_type type, if (ts->type != E1INP_TS_TYPE_SIGN) return NULL; - if (!tall_sigl_ctx) - tall_sigl_ctx = talloc_named_const(tall_bsc_ctx, 1, - "e1inp_sign_link"); - link = talloc_zero(tall_sigl_ctx, struct e1inp_sign_link); if (!link) return NULL; @@ -505,3 +501,9 @@ int e1inp_line_register(struct e1inp_line *line) return 0; } + +static __attribute__((constructor)) void on_dso_load_e1_inp(void) +{ + tall_sigl_ctx = talloc_named_const(tall_bsc_ctx, 1, + "e1inp_sign_link"); +} |