mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
avilib: free malloc'ed memory for super indexes
This commit is contained in:
parent
9867210534
commit
045fb9df48
2
NEWS.md
2
NEWS.md
@ -40,6 +40,8 @@
|
||||
* mkvpropedit: removed a small, constant-size memory leak when deleting
|
||||
properties.
|
||||
* mkvmerge: chapter handling: removed a small, constant-size memory leak.
|
||||
* mkvmerge, mkvextract: AVI handling: removed a small, constant-size memory
|
||||
leak when dealing with indexes in AVIs.
|
||||
|
||||
## Build system changes
|
||||
|
||||
|
@ -1951,6 +1951,15 @@ int AVI_close(avi_t *AVI)
|
||||
if(AVI->video_index) free(AVI->video_index);
|
||||
if(AVI->video_superindex) {
|
||||
if(AVI->video_superindex->aIndex) free(AVI->video_superindex->aIndex);
|
||||
if (AVI->video_superindex->stdindex) {
|
||||
for (j = 0; j < NR_IXNN_CHUNKS; j++)
|
||||
if (AVI->video_superindex->stdindex[j]) {
|
||||
if ((j < AVI->video_superindex->nEntriesInUse) && AVI->video_superindex->stdindex[j]->aIndex)
|
||||
free(AVI->video_superindex->stdindex[j]->aIndex);
|
||||
free(AVI->video_superindex->stdindex[j]);
|
||||
}
|
||||
free(AVI->video_superindex->stdindex);
|
||||
}
|
||||
free(AVI->video_superindex);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user