diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-05-17 03:17:43 +0300 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2017-11-08 18:46:57 +0700 |
commit | d0ed4de0854f16f3f03be681356755fddaf3d251 (patch) | |
tree | de945aa994d705590a3b778db736fadb68e360ad /src/host/layer23/src/mobile/mncc_sock.c | |
parent | 8dbacacd37e2d4810c8e0ff2008c94cc6ded0b13 (diff) |
host/mobile: use osmocom_ms as talloc context
As we use talloc, it's absurdly not to use the main feature of
the library - hierarchical memory management. This change sets
talloc context of all sub-allocated objects to related osmocom_ms
instance. So, as soon as osmocom_ms instance is destroyed, all
sub-allocated chunks are getting destroyed too.
Change-Id: I6e3467ff739f3e6dc8dd60cc6d1fcd3f8e490ce9
Diffstat (limited to 'src/host/layer23/src/mobile/mncc_sock.c')
-rw-r--r-- | src/host/layer23/src/mobile/mncc_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/host/layer23/src/mobile/mncc_sock.c b/src/host/layer23/src/mobile/mncc_sock.c index 1e239428..73159270 100644 --- a/src/host/layer23/src/mobile/mncc_sock.c +++ b/src/host/layer23/src/mobile/mncc_sock.c @@ -252,13 +252,13 @@ static int mncc_sock_accept(struct osmo_fd *bfd, unsigned int flags) } -struct mncc_sock_state *mncc_sock_init(void *inst, const char *name, void *tall_ctx) +struct mncc_sock_state *mncc_sock_init(void *inst, const char *name) { struct mncc_sock_state *state; struct osmo_fd *bfd; int rc; - state = talloc_zero(tall_ctx, struct mncc_sock_state); + state = talloc_zero(inst, struct mncc_sock_state); if (!state) return NULL; |