summaryrefslogtreecommitdiff
path: root/plugins/dumb
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-11 20:55:09 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-11 21:30:40 +0100
commitdfacef3019e560159601c80745f2b88919f65d27 (patch)
tree14fd54c01bf3ba26076c71f3ca09e6f77bbdc5fb /plugins/dumb
parent679daf9907e3ae8bba66fe8a2e5f57a2987130f4 (diff)
fixed few errors reported by cppcheck (thanks to Pavel Roschin)
Diffstat (limited to 'plugins/dumb')
-rw-r--r--plugins/dumb/dumb-kode54/src/it/readptm.c3
-rw-r--r--plugins/dumb/dumb-kode54/src/it/readxm.c1
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;
}