Sergio Ammirata
2018-12-07 08:50:12 UTC
vlc | branch: master | Sergio Ammirata <***@ammirata.net> | Wed Nov 28 07:04:33 2018 -0500| [381c61cff48064236a1e3b2c396b763ab4b5075d] | committer: Thomas Guillem
access_out: rist: close the sockets on error
modules/access_output/rist.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 0097291bed..d46f170d39 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -110,6 +110,8 @@ static struct rist_flow *rist_init_tx()
free(flow);
return NULL;
}
+ flow->fd_out = -1;
+ flow->fd_rtcp = -1;
return flow;
}
@@ -142,6 +144,10 @@ static struct rist_flow *rist_udp_transmitter(sout_access_out_t *p_access, char
return flow;
fail:
+ if (flow->fd_out != -1)
+ vlc_close(flow->fd_out);
+ if (flow->fd_rtcp != -1)
+ vlc_close(flow->fd_rtcp);
free(flow->buffer);
free(flow);
return NULL;
access_out: rist: close the sockets on error
http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=381c61cff48064236a1e3b2c396b763ab4b5075d
---modules/access_output/rist.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 0097291bed..d46f170d39 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -110,6 +110,8 @@ static struct rist_flow *rist_init_tx()
free(flow);
return NULL;
}
+ flow->fd_out = -1;
+ flow->fd_rtcp = -1;
return flow;
}
@@ -142,6 +144,10 @@ static struct rist_flow *rist_udp_transmitter(sout_access_out_t *p_access, char
return flow;
fail:
+ if (flow->fd_out != -1)
+ vlc_close(flow->fd_out);
+ if (flow->fd_rtcp != -1)
+ vlc_close(flow->fd_rtcp);
free(flow->buffer);
free(flow);
return NULL;