[FFmpeg-devel,2/2] lavf/tcp.c: Free allocated client URLContext in case of error.

Submitted by Stephan Holljes on Jan. 12, 2018, 6:16 p.m.

Details

Message ID 20180112181630.22533-2-klaxa1337@googlemail.com
State Accepted
Commit 37175122824d2706e8d2f67fc067b189ac400cd2
Headers show

Commit Message

Stephan Holljes Jan. 12, 2018, 6:16 p.m.
Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
---
 libavformat/tcp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer Jan. 12, 2018, 7:47 p.m.
On Fri, Jan 12, 2018 at 07:16:30PM +0100, Stephan Holljes wrote:
> Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
> ---
>  libavformat/tcp.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

patchset is probably ok

[...]
Stephan Holljes March 30, 2018, 1:13 p.m.
On Fri, Jan 12, 2018 at 8:47 PM, Michael Niedermayer
<michael@niedermayer.cc> wrote:
> On Fri, Jan 12, 2018 at 07:16:30PM +0100, Stephan Holljes wrote:
>> Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
>> ---
>>  libavformat/tcp.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> patchset is probably ok
>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> It is what and why we do it that matters, not just one of them.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Ping
Stephan Holljes April 17, 2018, 9:45 p.m.
On Fri, Mar 30, 2018 at 3:13 PM, Stephan Holljes
<klaxa1337@googlemail.com> wrote:
> On Fri, Jan 12, 2018 at 8:47 PM, Michael Niedermayer
> <michael@niedermayer.cc> wrote:
>> On Fri, Jan 12, 2018 at 07:16:30PM +0100, Stephan Holljes wrote:
>>> Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
>>> ---
>>>  libavformat/tcp.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> patchset is probably ok
>>
>> [...]
>>
>> --
>> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>>
>> It is what and why we do it that matters, not just one of them.
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>
> Ping

Ping
Michael Niedermayer April 19, 2018, 12:46 a.m.
On Tue, Apr 17, 2018 at 11:45:08PM +0200, Stephan Holljes wrote:
> On Fri, Mar 30, 2018 at 3:13 PM, Stephan Holljes
> <klaxa1337@googlemail.com> wrote:
> > On Fri, Jan 12, 2018 at 8:47 PM, Michael Niedermayer
> > <michael@niedermayer.cc> wrote:
> >> On Fri, Jan 12, 2018 at 07:16:30PM +0100, Stephan Holljes wrote:
> >>> Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
> >>> ---
> >>>  libavformat/tcp.c | 4 +++-
> >>>  1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> patchset is probably ok
> >>
> >> [...]
> >>
> >> --
> >> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >>
> >> It is what and why we do it that matters, not just one of them.
> >>
> >> _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel@ffmpeg.org
> >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >
> > Ping
> 
> Ping

will apply

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/tcp.c b/libavformat/tcp.c
index 8773493df1..b0289f854f 100644
--- a/libavformat/tcp.c
+++ b/libavformat/tcp.c
@@ -208,8 +208,10 @@  static int tcp_accept(URLContext *s, URLContext **c)
         return ret;
     cc = (*c)->priv_data;
     ret = ff_accept(sc->fd, sc->listen_timeout, s);
-    if (ret < 0)
+    if (ret < 0) {
+        ffurl_closep(c);
         return ret;
+    }
     cc->fd = ret;
     return 0;
 }