avformat/ftp: Use av_freep() for dir_buffer
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 10 Aug 2015 16:46:38 +0000 (18:46 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 10 Aug 2015 16:46:38 +0000 (18:46 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/ftp.c

index 542cf6a..5d00780 100644 (file)
@@ -964,7 +964,7 @@ static int ftp_read_dir(URLContext *h, AVIODirEntry **next)
 static int ftp_close_dir(URLContext *h)
 {
     FTPContext *s = h->priv_data;
-    av_free(s->dir_buffer);
+    av_freep(&s->dir_buffer);
     ffurl_closep(&s->conn_control);
     ffurl_closep(&s->conn_data);
     return 0;