mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user