summaryrefslogtreecommitdiff
path: root/libavformat/mpegtsenc.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2011-05-09 16:29:01 +0300
committerMartin Storsjö <martin@martin.st>2011-05-09 19:14:40 +0300
commited87375dd555a1e7798dcd56c967af0171525a26 (patch)
tree1cdd58cb3f53d15924715c161458a8ed64fe6443 /libavformat/mpegtsenc.c
parenta7ea5e3d35f30180ad69b86e6328f434e29119dc (diff)
mpegtsenc: Clear st->priv_data when freeing it
If not cleared, the caller might try to free it. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/mpegtsenc.c')
-rw-r--r--libavformat/mpegtsenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index bf66aa0be3..55a16f7f0e 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -588,7 +588,7 @@ static int mpegts_write_header(AVFormatContext *s)
av_free(pids);
for(i = 0;i < s->nb_streams; i++) {
st = s->streams[i];
- av_free(st->priv_data);
+ av_freep(&st->priv_data);
}
return -1;
}