From b13cf829da5a35e1f6bd8a09250a97b8a212b718 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 21 Feb 2010 12:56:02 +0100 Subject: [nat/bsc] Fix memory leak of IPA messages... * The read_msg method is allocating the msgb and we will need to free it once we are done with it. --- openbsc/src/bsc_msc_ip.c | 1 + openbsc/src/nat/bsc_nat.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/openbsc/src/bsc_msc_ip.c b/openbsc/src/bsc_msc_ip.c index 54ed96b2a..f816b730f 100644 --- a/openbsc/src/bsc_msc_ip.c +++ b/openbsc/src/bsc_msc_ip.c @@ -641,6 +641,7 @@ static int ipaccess_a_fd_cb(struct bsc_fd *bfd, unsigned int what) else if (hh->proto == IPAC_PROTO_SCCP) sccp_system_incoming(msg); + talloc_free(msg); return 0; } diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c index 3f0a387a0..0ad8be986 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -148,6 +148,7 @@ static int ipaccess_msc_cb(struct bsc_fd *bfd, unsigned int what) else if (hh->proto == IPAC_PROTO_SCCP) forward_sccp_to_bts(msg); + talloc_free(msg); return 0; } @@ -203,6 +204,7 @@ static int ipaccess_bsc_cb(struct bsc_fd *bfd, unsigned int what) /* FIXME: Currently no PONG is sent to the BSC */ /* FIXME: Currently no ID ACK is sent to the BSC */ forward_sccp_to_msc(msg); + talloc_free(msg); return 0; } -- cgit v1.2.3