[vlc-devel] [PATCH] RIST access_output: fix mem leak that occured when socket creation failed

Sergio M. Ammirata sergio.ammirata at sipradius.com
Wed Dec 5 12:47:00 CET 2018


Here is a patch that fixes the open socket issue.

-----Original Message-----
From: vlc-devel [mailto:vlc-devel-bounces at videolan.org] On Behalf Of Thomas Guillem
Sent: Wednesday, November 28, 2018 5:22 AM
To: vlc-devel at videolan.org
Subject: Re: [vlc-devel] [PATCH] RIST access_output: fix mem leak that occured when socket creation failed

Hello,

You should also close flow sockets on error.

Note: rist_init_tx() should initiliaze all FDs to -1 (since 0 is valid).

Then you can add "if (flow->fd_out != -1) vlc_close(flow->fd_out)"; from the error handling.

On Tue, Nov 27, 2018, at 13:53, Sergio M. Ammirata wrote:
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> Email had 1 attachment:
> + 0001-RIST-access_output-fix-mem-leak-that-occured-when-so.patch
>   2k (text/plain)
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-RIST-access_output-close-the-sockets-on-error.patch
Type: application/octet-stream
Size: 986 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20181205/9b6575cd/attachment-0001.obj>


More information about the vlc-devel mailing list