ソースを参照

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;