diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-11 20:55:09 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-11 21:30:40 +0100 |
commit | dfacef3019e560159601c80745f2b88919f65d27 (patch) | |
tree | 14fd54c01bf3ba26076c71f3ca09e6f77bbdc5fb /plugins/dumb/dumb-kode54/src | |
parent | 679daf9907e3ae8bba66fe8a2e5f57a2987130f4 (diff) |
fixed few errors reported by cppcheck (thanks to Pavel Roschin)
Diffstat (limited to 'plugins/dumb/dumb-kode54/src')
-rw-r--r-- | plugins/dumb/dumb-kode54/src/it/readptm.c | 3 | ||||
-rw-r--r-- | plugins/dumb/dumb-kode54/src/it/readxm.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/plugins/dumb/dumb-kode54/src/it/readptm.c b/plugins/dumb/dumb-kode54/src/it/readptm.c index cae73edf..7e9801fe 100644 --- a/plugins/dumb/dumb-kode54/src/it/readptm.c +++ b/plugins/dumb/dumb-kode54/src/it/readptm.c @@ -457,6 +457,7 @@ static DUMB_IT_SIGDATA *it_ptm_load_sigdata(DUMBFILE *f) if (it_seek(f, 352)) { _dumb_it_unload_sigdata(sigdata); + free (component); return NULL; } @@ -468,12 +469,14 @@ static DUMB_IT_SIGDATA *it_ptm_load_sigdata(DUMBFILE *f) } if (it_seek(f, 608)) { + free (component); _dumb_it_unload_sigdata(sigdata); return NULL; } for (n = 0; n < sigdata->n_samples; n++) { if (it_ptm_read_sample_header(&sigdata->sample[n], &component[n_components].offset, f)) { + free (component); _dumb_it_unload_sigdata(sigdata); return NULL; } diff --git a/plugins/dumb/dumb-kode54/src/it/readxm.c b/plugins/dumb/dumb-kode54/src/it/readxm.c index 7ceed801..74bf02dd 100644 --- a/plugins/dumb/dumb-kode54/src/it/readxm.c +++ b/plugins/dumb/dumb-kode54/src/it/readxm.c @@ -907,6 +907,7 @@ static DUMB_IT_SIGDATA *it_xm_load_sigdata(DUMBFILE *f, int * version) sigdata->instrument = malloc(sigdata->n_instruments * sizeof(*sigdata->instrument)); if (!sigdata->instrument) { + free (roguebytes); _dumb_it_unload_sigdata(sigdata); return NULL; } |