Index: notify_body.c =================================================================== --- notify_body.c (revision 6758) +++ notify_body.c (working copy) @@ -340,7 +340,6 @@ xmlNodePtr state_node = NULL; str *body= NULL; - str *pres_uri= NULL; char buf[MAX_URI_SIZE+1]; if ( (pres_user->len + pres_domain->len + 1) > MAX_URI_SIZE) { @@ -353,23 +352,6 @@ memcpy(buf + pres_user->len + 5, pres_domain->s, pres_domain->len); buf[pres_user->len + 5 + pres_domain->len]= '\0'; - pres_uri = (str*)pkg_malloc(sizeof(str)); - if(pres_uri == NULL) - { - LM_ERR("while allocating memory\n"); - return NULL; - } - memset(pres_uri, 0, sizeof(str)); - pres_uri->s = buf; - pres_uri->len = pres_user->len + 5 + pres_domain->len; - - LM_DBG("[pres_uri] %.*s\n", pres_uri->len, pres_uri->s); - - if ( pres_contains_presence(pres_uri)<0 ) { - LM_DBG("No record exists in hash_table\n"); - goto error; - } - /* create the Publish body */ doc = xmlNewDoc(BAD_CAST "1.0"); if(doc==0) @@ -427,10 +409,6 @@ xmlCleanupParser(); return body; error: - if ( pres_uri ) - { - pkg_free(pres_uri); - } if(body) { if(body->s)