Browse code

core: switch.c Fixed dereference of null pointer

c->ct_rve is NULL in else branch, further deref. will cause chaos.

Marius Zbihlei authored on 14/01/2011 17:10:08
Showing 1 changed files
... ...
@@ -220,10 +220,7 @@ int fix_switch(struct action* t)
220 220
 			n++; /* count only non-default cases */
221 221
 		}else{
222 222
 			if (default_found){
223
-				LOG(L_ERR, "ERROR: fix_switch: more then one \"default\""
224
-						" label found (%d, %d)\n",
225
-						c->ct_rve->fpos.s_line,
226
-						c->ct_rve->fpos.s_col);
223
+				LOG(L_ERR, "ERROR: fix_switch: more then one \"default\"");
227 224
 				return E_UNSPEC;
228 225
 			}
229 226
 			default_found=1;