[vlc-commits] rtp: fix descriptor leak on error
Rémi Denis-Courmont
git at videolan.org
Sun Apr 26 11:09:17 CEST 2020
vlc/vlc-3.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 26 12:03:09 2020 +0300| [43c9693010f801a06972688b2427fdb15938197d] | committer: Rémi Denis-Courmont
rtp: fix descriptor leak on error
(cherry picked from commit 1ec49fcf11570f1eb043089997d387cc44daa7ba)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=43c9693010f801a06972688b2427fdb15938197d
---
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 8918ee92b8..8637476c15 100644
--- a/modules/access/rtp/rtp.c
+++ b/modules/access/rtp/rtp.c
@@ -239,8 +239,11 @@ static int Open (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