aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-11-17 02:55:08 +0100
committerHarald Welte <laforge@gnumonks.org>2017-11-18 10:19:04 +0000
commit3867a7422a5e52a31b3268c9034984c64b2f997b (patch)
treef398c4a7fa5812cdf8ba14004bfa0ed4e956c3b8
parent0a30a8522d3f4d4a1593269daef1498c3411b9df (diff)
sccp_test: sanitize: fix msgb mem leaks
-rw-r--r--tests/sccp/sccp_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c
index 6043cff..d6abc5d 100644
--- a/tests/sccp/sccp_test.c
+++ b/tests/sccp/sccp_test.c
@@ -450,6 +450,7 @@ void sccp_write_cb(struct sccp_connection *conn, struct msgb *data, void *gctx,
}
write_called = 1;
+ msgb_free(data);
}
void sccp_c_read(struct sccp_connection *connection, struct msgb *msgb, unsigned int len)
@@ -502,6 +503,7 @@ static void sccp_udt_write_cb(struct sccp_connection *conn, struct msgb *data, v
}
matched = 1;
+ msgb_free(data);
}
static void test_sccp_system(void)
@@ -981,6 +983,8 @@ static void test_sccp_address(void)
osmo_hexdump(msg->data, ret));
}
}
+
+ talloc_free(msg);
}
static const struct log_info_cat default_categories[] = {