tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

re: patch: debug instrumentation for dev/raidframe/rf_netbsdkintf.c



> > @@ -472,6 +472,9 @@
> >  	const char *bootname = device_xname(bdv);
> >  	size_t len = strlen(bootname);
> >  
> > +	if (bdv == NULL)
> > +		return 0;
> > +
> 
> This looked suspicious, even before I read the code.
> 
> The question is if it is ever legitimate for bdv to be NULL.

infact, bdv has already been dereferenced at this point:
the assignment to bootname 3 lines up.


.mrg.


Home | Main Index | Thread Index | Old Index