Browse code

core: check if proto is not null before setting it

- coherent checking across no_naptr_srv_sip_resolvehost()

Daniel-Constantin Mierla authored on 21/04/2014 15:54:26
Showing 1 changed files
... ...
@@ -1601,7 +1601,7 @@ struct hostent* no_naptr_srv_sip_resolvehost(str* name, unsigned short* port, ch
1601 1601
 			he=srv_sip_resolvehost(&srv_name, 0, port, proto, 1, 0);
1602 1602
 			#endif
1603 1603
 			if (he!=0) {
1604
-				*proto = srv_proto_list[i].proto;
1604
+				if(proto) *proto = srv_proto_list[i].proto;
1605 1605
 				return he;
1606 1606
 			}
1607 1607
 		}