mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Merged revisions 81433 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r81433 | russell | 2007-09-03 13:57:53 -0500 (Mon, 03 Sep 2007) | 5 lines Remove a couple of calls to ast_string_field_free_pools() on peers in error handling blocks in the code for building peers. The peer object destructor does this and doing it twice will cause a crash. (closes issue #10625, reported by and patched by pnlarsson) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -9517,20 +9517,16 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st | ||||
| 						ast_sched_del(sched, peer->expire); | ||||
| 					peer->expire = -1; | ||||
| 					ast_clear_flag(peer, IAX_DYNAMIC); | ||||
| 					if (ast_dnsmgr_lookup(v->value, &peer->addr.sin_addr, &peer->dnsmgr)) { | ||||
| 						ast_string_field_free_pools(peer); | ||||
| 					if (ast_dnsmgr_lookup(v->value, &peer->addr.sin_addr, &peer->dnsmgr)) | ||||
| 						return peer_unref(peer); | ||||
| 					} | ||||
| 					if (!peer->addr.sin_port) | ||||
| 						peer->addr.sin_port = htons(IAX_DEFAULT_PORTNO); | ||||
| 				} | ||||
| 				if (!maskfound) | ||||
| 					inet_aton("255.255.255.255", &peer->mask); | ||||
| 			} else if (!strcasecmp(v->name, "defaultip")) { | ||||
| 				if (ast_get_ip(&peer->defaddr, v->value)) { | ||||
| 					ast_string_field_free_pools(peer); | ||||
| 				if (ast_get_ip(&peer->defaddr, v->value)) | ||||
| 					return peer_unref(peer); | ||||
| 				} | ||||
| 			} else if (!strcasecmp(v->name, "sourceaddress")) { | ||||
| 				peer_set_srcaddr(peer, v->value); | ||||
| 			} else if (!strcasecmp(v->name, "permit") || | ||||
|   | ||||
		Reference in New Issue
	
	Block a user