mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
Fix memory leaks.
This commit is contained in:
parent
3d83ed2ee5
commit
865f083128
1 changed files with 3 additions and 0 deletions
|
@ -439,6 +439,7 @@ static DUMB_IT_SIGDATA *it_ptm_load_sigdata(DUMBFILE *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dumbfile_seek(f, 352, DFS_SEEK_SET)) {
|
if (dumbfile_seek(f, 352, DFS_SEEK_SET)) {
|
||||||
|
free(component);
|
||||||
_dumb_it_unload_sigdata(sigdata);
|
_dumb_it_unload_sigdata(sigdata);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -451,12 +452,14 @@ static DUMB_IT_SIGDATA *it_ptm_load_sigdata(DUMBFILE *f)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dumbfile_seek(f, 608, DFS_SEEK_SET)) {
|
if (dumbfile_seek(f, 608, DFS_SEEK_SET)) {
|
||||||
|
free(component);
|
||||||
_dumb_it_unload_sigdata(sigdata);
|
_dumb_it_unload_sigdata(sigdata);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (n = 0; n < sigdata->n_samples; n++) {
|
for (n = 0; n < sigdata->n_samples; n++) {
|
||||||
if (it_ptm_read_sample_header(&sigdata->sample[n], &component[n_components].offset, f)) {
|
if (it_ptm_read_sample_header(&sigdata->sample[n], &component[n_components].offset, f)) {
|
||||||
|
free(component);
|
||||||
_dumb_it_unload_sigdata(sigdata);
|
_dumb_it_unload_sigdata(sigdata);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue