瀏覽代碼

core: init origproto to fix compiler warning

- GH #2543
Daniel-Constantin Mierla 4 年之前
父節點
當前提交
ef3233d140
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/core/dns_cache.c

+ 1 - 0
src/core/dns_cache.c

@@ -3261,6 +3261,7 @@ inline static int dns_naptr_sip_resolve(struct dns_srv_handle* h,  str* name,
 
 	ret=-E_DNS_NO_NAPTR;
 	if(proto) origproto=*proto;
+	else origproto = PROTO_NONE;
 	if (dns_hash==0){ /* not init => use normal, non-cached version */
 		LM_WARN("called before dns cache initialization\n");
 		h->srv=h->a=0;