Fix potential bridge hook resource leak if the hook install fails.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392335 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Richard Mudgett
2013-06-20 17:21:40 +00:00
parent 33eb15a242
commit cd40e179a9
5 changed files with 61 additions and 11 deletions

View File

@@ -542,6 +542,7 @@ void parking_set_duration(struct ast_bridge_features *features, struct parked_us
if (ast_bridge_interval_hook(features, time_limit,
parking_duration_callback, user, parking_duration_cb_destroyer, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) {
ast_log(LOG_ERROR, "Failed to apply duration limits to the parking call.\n");
ao2_ref(user, -1);
}
}