libavformat/unix.c:78: error: Resource Leak
  resource acquired by call to `ff_socket()` at line 74, column 15 is not released after line 78, column 9.

libavformat/unix.c:65:1: start of procedure unix_open()
63. };
64. 
65. static int unix_open(URLContext *h, const char *filename, int flags)
    ^
66. {
67.     UnixContext *s = h->priv_data;

libavformat/unix.c:67:5: 
65. static int unix_open(URLContext *h, const char *filename, int flags)
66. {
67.     UnixContext *s = h->priv_data;
        ^
68.     int fd, ret;
69. 

libavformat/unix.c:70:5: Skipping av_strstart(): empty list of specs
68.     int fd, ret;
69. 
70.     av_strstart(filename, "unix:", &filename);
        ^
71.     s->addr.sun_family = AF_UNIX;
72.     av_strlcpy(s->addr.sun_path, filename, sizeof(s->addr.sun_path));

libavformat/unix.c:71:5: 
69. 
70.     av_strstart(filename, "unix:", &filename);
71.     s->addr.sun_family = AF_UNIX;
        ^
72.     av_strlcpy(s->addr.sun_path, filename, sizeof(s->addr.sun_path));
73. 

libavformat/unix.c:72:5: 
70.     av_strstart(filename, "unix:", &filename);
71.     s->addr.sun_family = AF_UNIX;
72.     av_strlcpy(s->addr.sun_path, filename, sizeof(s->addr.sun_path));
        ^
73. 
74.     if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0)

libavutil/avstring.c:81:1: start of procedure av_strlcpy()
  79. }
  80. 
  81. size_t av_strlcpy(char *dst, const char *src, size_t size)
      ^
  82. {
  83.     size_t len = 0;

libavutil/avstring.c:83:5: 
  81. size_t av_strlcpy(char *dst, const char *src, size_t size)
  82. {
  83.     size_t len = 0;
          ^
  84.     while (++len < size && *src)
  85.         *dst++ = *src++;

libavutil/avstring.c:84:12: Loop condition is true. Entering loop body
  82. {
  83.     size_t len = 0;
  84.     while (++len < size && *src)
                 ^
  85.         *dst++ = *src++;
  86.     if (len <= size)

libavutil/avstring.c:84:28: Loop condition is false. Leaving loop
  82. {
  83.     size_t len = 0;
  84.     while (++len < size && *src)
                                 ^
  85.         *dst++ = *src++;
  86.     if (len <= size)

libavutil/avstring.c:86:9: Taking true branch
  84.     while (++len < size && *src)
  85.         *dst++ = *src++;
  86.     if (len <= size)
              ^
  87.         *dst = 0;
  88.     return len + strlen(src) - 1;

libavutil/avstring.c:87:9: 
  85.         *dst++ = *src++;
  86.     if (len <= size)
  87.         *dst = 0;
              ^
  88.     return len + strlen(src) - 1;
  89. }

libavutil/avstring.c:88:5: 
  86.     if (len <= size)
  87.         *dst = 0;
  88.     return len + strlen(src) - 1;
          ^
  89. }
  90. 

libavutil/avstring.c:89:1: return from a call to av_strlcpy
  87.         *dst = 0;
  88.     return len + strlen(src) - 1;
  89. }
      ^
  90. 
  91. size_t av_strlcat(char *dst, const char *src, size_t size)

libavformat/unix.c:74:9: 
72.     av_strlcpy(s->addr.sun_path, filename, sizeof(s->addr.sun_path));
73. 
74.     if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0)
            ^
75.         return ff_neterrno();
76. 

libavformat/network.h:253:1: start of procedure ff_socket()
  251. #endif
  252. 
  253. static inline int ff_socket(int domain, int type, int protocol)
       ^
  254. {
  255.     return socket(domain, type | SOCK_CLOEXEC, protocol);

libavformat/network.h:255:5: 
  253. static inline int ff_socket(int domain, int type, int protocol)
  254. {
  255.     return socket(domain, type | SOCK_CLOEXEC, protocol);
           ^
  256. }
  257. 

libavformat/network.h:256:1: return from a call to ff_socket
  254. {
  255.     return socket(domain, type | SOCK_CLOEXEC, protocol);
  256. }
       ^
  257. 
  258. #endif /* AVFORMAT_NETWORK_H */

libavformat/unix.c:74:9: Taking false branch
72.     av_strlcpy(s->addr.sun_path, filename, sizeof(s->addr.sun_path));
73. 
74.     if ((fd = ff_socket(AF_UNIX, s->type, 0)) < 0)
            ^
75.         return ff_neterrno();
76. 

libavformat/unix.c:77:9: Taking true branch
75.         return ff_neterrno();
76. 
77.     if (s->listen) {
            ^
78.         fd = ff_listen_bind(fd, (struct sockaddr *)&s->addr,
79.                             sizeof(s->addr), s->timeout, h);

libavformat/unix.c:78:9: 
76. 
77.     if (s->listen) {
78.         fd = ff_listen_bind(fd, (struct sockaddr *)&s->addr,
            ^
79.                             sizeof(s->addr), s->timeout, h);
80.         if (fd < 0) {

libavformat/network.c:213:1: start of procedure ff_listen_bind()
  211. }
  212. 
  213. int ff_listen_bind(int fd, const struct sockaddr *addr,
       ^
  214.                    socklen_t addrlen, int timeout, URLContext *h)
  215. {

libavformat/network.c:217:5: 
  215. {
  216.     int ret;
  217.     int reuse = 1;
           ^
  218.     struct pollfd lp = { fd, POLLIN, 0 };
  219.     setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));

libavformat/network.c:218:5: 
  216.     int ret;
  217.     int reuse = 1;
  218.     struct pollfd lp = { fd, POLLIN, 0 };
           ^
  219.     setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
  220.     ret = bind(fd, addr, addrlen);

libavformat/network.c:219:5: Skipping setsockopt(): method has no implementation
  217.     int reuse = 1;
  218.     struct pollfd lp = { fd, POLLIN, 0 };
  219.     setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
           ^
  220.     ret = bind(fd, addr, addrlen);
  221.     if (ret)

libavformat/network.c:220:5: Skipping bind(): method has no implementation
  218.     struct pollfd lp = { fd, POLLIN, 0 };
  219.     setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
  220.     ret = bind(fd, addr, addrlen);
           ^
  221.     if (ret)
  222.         return ff_neterrno();

libavformat/network.c:221:9: Taking false branch
  219.     setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
  220.     ret = bind(fd, addr, addrlen);
  221.     if (ret)
               ^
  222.         return ff_neterrno();
  223. 

libavformat/network.c:224:5: Skipping listen(): method has no implementation
  222.         return ff_neterrno();
  223. 
  224.     ret = listen(fd, 1);
           ^
  225.     if (ret)
  226.         return ff_neterrno();

libavformat/network.c:225:9: Taking false branch
  223. 
  224.     ret = listen(fd, 1);
  225.     if (ret)
               ^
  226.         return ff_neterrno();
  227. 

libavformat/network.c:228:5: 
  226.         return ff_neterrno();
  227. 
  228.     ret = ff_poll_interrupt(&lp, 1, timeout, &h->interrupt_callback);
           ^
  229.     if (ret < 0)
  230.         return ret;

libavformat/network.c:192:1: start of procedure ff_poll_interrupt()
    190. }
    191. 
    192. static int ff_poll_interrupt(struct pollfd *p, nfds_t nfds, int timeout,
         ^
    193.                              AVIOInterruptCB *cb)
    194. {

libavformat/network.c:195:5: 
    193.                              AVIOInterruptCB *cb)
    194. {
    195.     int runs = timeout / POLLING_TIME;
             ^
    196.     int ret = 0;
    197. 

libavformat/network.c:196:5: 
    194. {
    195.     int runs = timeout / POLLING_TIME;
    196.     int ret = 0;
             ^
    197. 
    198.     do {

libavformat/network.c:199:13: 
    197. 
    198.     do {
    199.         if (ff_check_interrupt(cb))
                     ^
    200.             return AVERROR_EXIT;
    201.         ret = poll(p, nfds, POLLING_TIME);

libavformat/avio.c:369:1: start of procedure ff_check_interrupt()
      367. }
      368. 
      369. int ff_check_interrupt(AVIOInterruptCB *cb)
           ^
      370. {
      371.     int ret;

libavformat/avio.c:372:9: Taking true branch
      370. {
      371.     int ret;
      372.     if (cb && cb->callback && (ret = cb->callback(cb->opaque)))
                   ^
      373.         return ret;
      374.     return 0;

libavformat/avio.c:372:15: Taking true branch
      370. {
      371.     int ret;
      372.     if (cb && cb->callback && (ret = cb->callback(cb->opaque)))
                         ^
      373.         return ret;
      374.     return 0;

libavformat/avio.c:372:32: Taking false branch
      370. {
      371.     int ret;
      372.     if (cb && cb->callback && (ret = cb->callback(cb->opaque)))
                                          ^
      373.         return ret;
      374.     return 0;

libavformat/avio.c:374:5: 
      372.     if (cb && cb->callback && (ret = cb->callback(cb->opaque)))
      373.         return ret;
      374.     return 0;
               ^
      375. }

libavformat/avio.c:375:1: return from a call to ff_check_interrupt
      373.         return ret;
      374.     return 0;
      375. }
           ^

libavformat/network.c:199:13: Taking false branch
    197. 
    198.     do {
    199.         if (ff_check_interrupt(cb))
                     ^
    200.             return AVERROR_EXIT;
    201.         ret = poll(p, nfds, POLLING_TIME);

libavformat/network.c:201:9: Skipping poll(): method has no implementation
    199.         if (ff_check_interrupt(cb))
    200.             return AVERROR_EXIT;
    201.         ret = poll(p, nfds, POLLING_TIME);
                 ^
    202.         if (ret != 0)
    203.             break;

libavformat/network.c:202:13: Taking true branch
    200.             return AVERROR_EXIT;
    201.         ret = poll(p, nfds, POLLING_TIME);
    202.         if (ret != 0)
                     ^
    203.             break;
    204.     } while (timeout < 0 || runs-- > 0);

libavformat/network.c:206:10: Taking false branch
    204.     } while (timeout < 0 || runs-- > 0);
    205. 
    206.     if (!ret)
                  ^
    207.         return AVERROR(ETIMEDOUT);
    208.     if (ret < 0)

libavformat/network.c:208:9: Taking true branch
    206.     if (!ret)
    207.         return AVERROR(ETIMEDOUT);
    208.     if (ret < 0)
                 ^
    209.         return AVERROR(errno);
    210.     return ret;

libavformat/network.c:209:9: 
    207.         return AVERROR(ETIMEDOUT);
    208.     if (ret < 0)
    209.         return AVERROR(errno);
                 ^
    210.     return ret;
    211. }

libavformat/network.c:211:1: return from a call to ff_poll_interrupt
    209.         return AVERROR(errno);
    210.     return ret;
    211. }
         ^
    212. 
    213. int ff_listen_bind(int fd, const struct sockaddr *addr,

libavformat/network.c:229:9: Taking true branch
  227. 
  228.     ret = ff_poll_interrupt(&lp, 1, timeout, &h->interrupt_callback);
  229.     if (ret < 0)
               ^
  230.         return ret;
  231. 

libavformat/network.c:230:9: 
  228.     ret = ff_poll_interrupt(&lp, 1, timeout, &h->interrupt_callback);
  229.     if (ret < 0)
  230.         return ret;
               ^
  231. 
  232.     ret = accept(fd, NULL, NULL);

libavformat/network.c:240:1: return from a call to ff_listen_bind
  238.     ff_socket_nonblock(ret, 1);
  239.     return ret;
  240. }
       ^
  241. 
  242. int ff_listen_connect(int fd, const struct sockaddr *addr,
