Skip to content

Commit

Permalink
utils: handle error case for xcap auth status to free allocated structs
Browse files Browse the repository at this point in the history
(cherry picked from commit ae7dce4)
  • Loading branch information
miconda committed Aug 30, 2017
1 parent badc783 commit 3ce03c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modules/utils/xcap_auth.c
Expand Up @@ -465,6 +465,12 @@ int ki_xcap_auth_status(sip_msg_t* _msg, str* watcher_uri, str* presentity_uri)
res = get_rules_doc(&uri.user, &uri.host, PRES_RULES, &rules_doc);
if ((res < 0) || (rules_doc == NULL) || (rules_doc->s == NULL)) {
LM_DBG("no xcap rules doc found for presentity uri\n");
if(rules_doc) {
if(rules_doc->s) {
pkg_free(rules_doc->s);
}
pkg_free(rules_doc);
}
return PENDING_STATUS;
}

Expand Down

0 comments on commit 3ce03c2

Please sign in to comment.