aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-28 17:30:31 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-28 17:56:16 +0100
commit37b5ce56a0650eeb8a3c6b788d1c9ba16139b313 (patch)
tree526eb09af45045eac691367a5c1bd0ecc9bf3260
parent9967a57587b9dcc1eeeaa710159447eb098380f3 (diff)
rtp: Fix memory leak fixed by Andreas without mentioning it
We allocate the msgb at entry of the method and we always need to msgb_free it.
-rw-r--r--openbsc/src/libtrau/rtp_proxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c
index 82f4063b2..be00dde3b 100644
--- a/openbsc/src/libtrau/rtp_proxy.c
+++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -394,7 +394,7 @@ static int rtp_socket_read(struct rtp_socket *rs, struct rtp_sub_socket *rss)
rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE);
if (rc <= 0) {
rss->bfd.when &= ~BSC_FD_READ;
- return rc;
+ goto out_free;
}
msgb_put(msg, rc);