diff options
Diffstat (limited to 'res/stasis/control.c')
-rw-r--r-- | res/stasis/control.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/res/stasis/control.c b/res/stasis/control.c index df57a90a7..9d8abe0cc 100644 --- a/res/stasis/control.c +++ b/res/stasis/control.c @@ -65,6 +65,11 @@ struct stasis_app_control *control_create(struct ast_channel *channel) control->command_queue = ao2_container_alloc_list( AO2_ALLOC_OPT_LOCK_MUTEX, 0, NULL, NULL); + if (!control->command_queue) { + ao2_cleanup(control); + return NULL; + } + control->channel = channel; return control; |