Browse Source

core: check if proto is not null before setting it

- coherent checking across no_naptr_srv_sip_resolvehost()
Daniel-Constantin Mierla 11 years ago
parent
commit
3257da4abf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      resolve.c

+ 1 - 1
resolve.c

@@ -1601,7 +1601,7 @@ struct hostent* no_naptr_srv_sip_resolvehost(str* name, unsigned short* port, ch
 			he=srv_sip_resolvehost(&srv_name, 0, port, proto, 1, 0);
 			he=srv_sip_resolvehost(&srv_name, 0, port, proto, 1, 0);
 			#endif
 			#endif
 			if (he!=0) {
 			if (he!=0) {
-				*proto = srv_proto_list[i].proto;
+				if(proto) *proto = srv_proto_list[i].proto;
 				return he;
 				return he;
 			}
 			}
 		}
 		}