mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 00:00:09 +00:00
res_pjsip_pubsub.c: Fix off-nominal memory leak.
Fix off-nominal visited vector leak in build_resource_tree(). Change-Id: If0399c7941c9c0b1038bcfb7b9a371760977831c
This commit is contained in:
@@ -982,6 +982,7 @@ static int build_resource_tree(struct ast_sip_endpoint *endpoint, const struct a
|
||||
|
||||
tree->root = tree_node_alloc(resource, &visited, list->full_state);
|
||||
if (!tree->root) {
|
||||
AST_VECTOR_FREE(&visited);
|
||||
return 500;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user