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:
parent
9967a57587
commit
37b5ce56a0
|
@ -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);
|
rc = read(rss->bfd.fd, msg->data, RTP_ALLOC_SIZE);
|
||||||
if (rc <= 0) {
|
if (rc <= 0) {
|
||||||
rss->bfd.when &= ~BSC_FD_READ;
|
rss->bfd.when &= ~BSC_FD_READ;
|
||||||
return rc;
|
goto out_free;
|
||||||
}
|
}
|
||||||
|
|
||||||
msgb_put(msg, rc);
|
msgb_put(msg, rc);
|
||||||
|
|
Loading…
Reference in New Issue