ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Mon 
Dec 26 17:41:38 2016 +0100| [89d4d7d759a59e8535b267b7f5af757f731da712] | 
committer: Michael Niedermayer

doc/examples/http_multiclient: Fix resource leak

Fixes CID1396269

Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89d4d7d759a59e8535b267b7f5af757f731da712
---

 doc/examples/http_multiclient.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/examples/http_multiclient.c b/doc/examples/http_multiclient.c
index 7173c4d..e2c2201 100644
--- a/doc/examples/http_multiclient.c
+++ b/doc/examples/http_multiclient.c
@@ -45,6 +45,7 @@ static void process_client(AVIOContext *client, const char 
*in_uri)
         // may return empty string.
         if (resource && strlen(resource))
             break;
+        av_freep(&resource);
     }
     if (ret < 0)
         goto end;
@@ -93,6 +94,7 @@ end:
     avio_close(client);
     fprintf(stderr, "Closing input\n");
     avio_close(input);
+    av_freep(&resource);
 }
 
 int main(int argc, char **argv)

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to