From fd878e23d73f79bc5d3b32c26dd71d4dd9fbaa84 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 27 May 2011 08:46:10 +0200 Subject: [PATCH] tetra-rx: use talloc --- src/tetra-rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tetra-rx.c b/src/tetra-rx.c index 3a464bd..c751772 100644 --- a/src/tetra-rx.c +++ b/src/tetra-rx.c @@ -58,7 +58,7 @@ int main(int argc, char **argv) tms = talloc_zero(tetra_tall_ctx, struct tetra_mac_state); tetra_mac_state_init(tms); - trs = calloc(1, sizeof(*trs)); + trs = talloc_zero(tetra_tall_ctx, struct tetra_rx_state); trs->burst_cb_priv = tms; while (1) { @@ -76,7 +76,7 @@ int main(int argc, char **argv) tetra_burst_sync_in(trs, buf, len); } - free(trs); + talloc_free(trs); talloc_free(tms); exit(0);