Skip to content
Snippets Groups Projects
Commit ca5bffb3 authored by Jenkins2's avatar Jenkins2 Committed by Gerrit Code Review
Browse files

Merge "res_pjsip_exten_state: Check for vector append failure."

parents ebd9e5c8 8684219f
Branches
Tags
No related merge requests found
......@@ -729,8 +729,11 @@ static int exten_state_publisher_state_cb(const char *context, const char *exten
}
ao2_ref(publisher, +1);
AST_VECTOR_APPEND(&pub_data->pubs, publisher);
ast_debug(5, "'%s' will publish exten state\n", publisher->name);
if (AST_VECTOR_APPEND(&pub_data->pubs, publisher)) {
ao2_ref(publisher, -1);
} else {
ast_debug(5, "'%s' will publish exten state\n", publisher->name);
}
}
ao2_iterator_destroy(&publisher_iter);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment