summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2022-06-09 07:47:36 -0700
committerVito Caputo <vcaputo@pengaru.com>2022-06-10 20:59:03 -0700
commit36171134c5ea8d78849f1009bae14e83c9b8feec (patch)
tree710e651fc3294c0e9319ec39341688821acc0f65 /src
parent59701ade1169da559dd90c1892e97bb93191e78e (diff)
modules/montage: minor fixups
Contexts aren't void* anymore, and free the contexts array too on failure.
Diffstat (limited to 'src')
-rw-r--r--src/modules/montage/montage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/montage/montage.c b/src/modules/montage/montage.c
index 4702564..2db9fdd 100644
--- a/src/modules/montage/montage.c
+++ b/src/modules/montage/montage.c
@@ -77,8 +77,9 @@ static til_module_context_t * montage_create_context(unsigned seed, unsigned tic
ctxt->modules[ctxt->n_modules++] = module;
}
- ctxt->contexts = calloc(ctxt->n_modules, sizeof(void *));
+ ctxt->contexts = calloc(ctxt->n_modules, sizeof(til_module_context_t *));
if (!ctxt->contexts) {
+ free(ctxt->modules);
free(ctxt);
return NULL;
© All Rights Reserved