Skip to content
Snippets Groups Projects
Commit 84a30a4a authored by Joshua Colp's avatar Joshua Colp Committed by Gerrit Code Review
Browse files

Merge "Check for ao2_alloc failure in __ast_channel_internal_alloc."

parents bfdc766b 5757d2d3
No related branches found
No related tags found
No related merge requests found
...@@ -1449,6 +1449,10 @@ struct ast_channel *__ast_channel_internal_alloc(void (*destructor)(void *obj), ...@@ -1449,6 +1449,10 @@ struct ast_channel *__ast_channel_internal_alloc(void (*destructor)(void *obj),
tmp = ao2_alloc(sizeof(*tmp), destructor); tmp = ao2_alloc(sizeof(*tmp), destructor);
#endif #endif
if (!tmp) {
return NULL;
}
if ((ast_string_field_init(tmp, 128))) { if ((ast_string_field_init(tmp, 128))) {
return ast_channel_unref(tmp); return ast_channel_unref(tmp);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment