free in case of multiple type == 2
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 27 Feb 2008 09:31:41 +0000 (09:31 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Wed, 27 Feb 2008 09:31:41 +0000 (09:31 +0000)
Originally committed as revision 12263 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/mov.c

index 3a18e66..1d666dd 100644 (file)
@@ -254,6 +254,7 @@ static int mov_read_dref(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
                 if (len&1)
                     len += 1;
                 if (type == 2) { // absolute path
+                    av_free(dref->path);
                     dref->path = av_mallocz(len+1);
                     if (!dref->path)
                         return AVERROR(ENOMEM);