avformat/avio: free url/avio options
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 28 Jan 2016 22:49:06 +0000 (23:49 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 29 Jan 2016 18:23:02 +0000 (19:23 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/avio.c
libavformat/aviobuf.c

index 05d0557..96b18fd 100644 (file)
@@ -412,6 +412,7 @@ int ffurl_closep(URLContext **hh)
             av_opt_free(h->priv_data);
         av_freep(&h->priv_data);
     }
+    av_opt_free(h);
     av_freep(hh);
     return ret;
 }
index b56d113..9851981 100644 (file)
@@ -956,6 +956,7 @@ int avio_close(AVIOContext *s)
         av_log(s, AV_LOG_DEBUG, "Statistics: %d seeks, %d writeouts\n", s->seek_count, s->writeout_count);
     else
         av_log(s, AV_LOG_DEBUG, "Statistics: %"PRId64" bytes read, %d seeks\n", s->bytes_read, s->seek_count);
+    av_opt_free(s);
     av_free(s);
     return ffurl_close(h);
 }