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.
This commit is contained in:
Holger Hans Peter Freyther 2015-03-28 17:30:31 +01:00
parent 9967a57587
commit 37b5ce56a0
1 changed files with 1 additions and 1 deletions

View File

@ -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);