소스 검색

Prevent NULL pointer dereference when rtype was incorrect

Found with clang
Marius Zbihlei 14 년 전
부모
커밋
f7c16aaa7e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      route.c

+ 1 - 1
route.c

@@ -1754,7 +1754,7 @@ inline static int comp_ip(int op, struct ip_addr* ip, int rtype,
 		default:
 			LOG(L_CRIT, "BUG: comp_ip: invalid type for "
 						" src_ip or dst_ip (%d)\n", rtype);
-			ret=-1;
+			return -1;
 	}
 	/* here "right" is set to the str we compare with */
 	r_expop.str=*right;