avformat/mpegtsenc: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-12-21 19:24:32 +01:00
parent 47b9481d9d
commit f7a4589b36

View File

@ -814,9 +814,9 @@ fail:
service = ts->services[i];
av_freep(&service->provider_name);
av_freep(&service->name);
av_free(service);
av_freep(&service);
}
av_free(ts->services);
av_freep(&ts->services);
return ret;
}
@ -1417,9 +1417,9 @@ static int mpegts_write_end(AVFormatContext *s)
service = ts->services[i];
av_freep(&service->provider_name);
av_freep(&service->name);
av_free(service);
av_freep(&service);
}
av_free(ts->services);
av_freep(&ts->services);
return 0;
}