lavf/tcp.c: Free allocated client URLContext in case of error.

Signed-off-by: Stephan Holljes <klaxa1337@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/298/head
Stephan Holljes 7 years ago committed by Michael Niedermayer
parent 768c0774d8
commit 3717512282
  1. 4
      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;
}

Loading…
Cancel
Save