summaryrefslogtreecommitdiff
path: root/src/til.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/til.c')
-rw-r--r--src/til.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/til.c b/src/til.c
index c00f6a3..038070b 100644
--- a/src/til.c
+++ b/src/til.c
@@ -248,17 +248,12 @@ int til_module_create_context(const til_module_t *module, til_stream_t *stream,
n_cpus = til_threads_num_threads(til_threads);
if (!module->create_context)
- context = til_module_context_new(stream, sizeof(til_module_context_t), seed, ticks, n_cpus, path);
+ context = til_module_context_new(module, sizeof(til_module_context_t), stream, seed, ticks, n_cpus, path);
else
- context = module->create_context(stream, seed, ticks, n_cpus, path, setup);
-
- if (!context) {
- free(path);
+ context = module->create_context(module, stream, seed, ticks, n_cpus, path, setup);
+ if (!context)
return -ENOMEM;
- }
-
- context->module = module;
*res_context = context;
© All Rights Reserved