Browse Source

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>
tags/n4.1
Stephan Holljes Michael Niedermayer 8 years ago
parent
commit
3717512282
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavformat/tcp.c

+ 3
- 1
libavformat/tcp.c View File

@@ -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