res_pjsip_pubsub.c: Fix off-nominal memory leak.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 21 Aug 2015 22:40:39 +0000 (17:40 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 10 Sep 2015 18:16:12 +0000 (13:16 -0500)
Fix off-nominal visited vector leak in build_resource_tree().

Change-Id: If0399c7941c9c0b1038bcfb7b9a371760977831c

res/res_pjsip_pubsub.c

index 3af33a1..5997640 100644 (file)
@@ -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;
        }