Commit 34bf25cf authored by Daan Vreeken's avatar Daan Vreeken
Browse files

Don't forget to return 'failure' when we're out of memory.

	modified:   controller/controller/controller_block.c
parent 561614dc
......@@ -78,8 +78,11 @@ int controller_block_create(char *type, char *name, int argc, va_list ap,
free(symbol);
if (!create) {
create = calloc(sizeof(struct controller_block_create) + sizeof(char *) * 2, 1);
if (!create)
if (create == NULL) {
log_send(LOG_T_ERROR, "Out of memory");
ret = -1;
goto err;
}
create_alloc = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment