[vlc-commits] rtp: fix descriptor leak on error
Rémi Denis-Courmont
git at videolan.org
Sun Apr 26 11:06:21 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 26 12:03:09 2020 +0300| [1ec49fcf11570f1eb043089997d387cc44daa7ba] | committer: Rémi Denis-Courmont
rtp: fix descriptor leak on error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1ec49fcf11570f1eb043089997d387cc44daa7ba
---
modules/access/rtp/rtp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c
index 25c0e2725b..db2d28ecdc 100644
--- a/modules/access/rtp/rtp.c
+++ b/modules/access/rtp/rtp.c
@@ -401,8 +401,11 @@ static int OpenURL(vlc_object_t *obj)
}
free (tmp);
- if (fd == -1)
+ if (fd == -1) {
+ if (rtcp_fd != -1)
+ net_Close(rtcp_fd);
return VLC_EGENERIC;
+ }
net_SetCSCov (fd, -1, 12);
/* Initializes demux */
More information about the vlc-commits
mailing list