commit | e66dc1d51fa57d4884f768c23953831013357442 | [log] [tgz] |
---|---|---|
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Sat Mar 28 17:30:31 2015 +0100 |
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Sat Mar 28 17:56:16 2015 +0100 |
tree | 526eb09af45045eac691367a5c1bd0ecc9bf3260 | |
parent | 0005a0325c7019059487e56783bdaadf1609f878 [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.
diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index 82f4063..be00dde 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c
@@ -394,7 +394,7 @@ 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);