浏览代码

rls: removed local variable contact, unused inside rls_handle_subscribe()

Daniel-Constantin Mierla 7 年之前
父节点
当前提交
2aebb2bf1f
共有 1 个文件被更改,包括 0 次插入15 次删除
  1. 0 15
      src/modules/rls/subscribe.c

+ 0 - 15
src/modules/rls/subscribe.c

@@ -479,7 +479,6 @@ int rls_handle_subscribe(struct sip_msg* msg, str watcher_user, str watcher_doma
 	pres_ev_t* event = NULL;
 	int err_ret = -1;
 	int ret = to_presence_code;
-	str* contact = NULL;
 	xmlDocPtr doc = NULL;
 	xmlNodePtr service_node = NULL;
 	unsigned int hash_code=0;
@@ -802,13 +801,6 @@ done:
 	ret = 1;
 stop:
 forpresence:
-	if(contact!=NULL)
-	{
-		if(contact->s!=NULL)
-			pkg_free(contact->s);
-		pkg_free(contact);
-	}
-
 	if(subs.pres_uri.s!=NULL)
 		pkg_free(subs.pres_uri.s);
 	if(subs.record_route.s!=NULL)
@@ -829,13 +821,6 @@ bad_event:
 
 error:
 	LM_ERR("occurred in rls_handle_subscribe\n");
-
-	if(contact!=NULL)
-	{
-		if(contact->s!=NULL)
-			pkg_free(contact->s);
-		pkg_free(contact);
-	}
 	if(subs.pres_uri.s!=NULL)
 		pkg_free(subs.pres_uri.s);