I think the semantics are that the pointer is only used if
private_data_len > 0.  Otherwise, it is undefined.  So I think we should
keep the check.  Plus I don't like calling kfree() with a NULL pointer.
It just seems wrong...

;-)


On Thu, 2006-11-09 at 14:59 -0800, Roland Dreier wrote:
>  > >  if (iw_event->private_data_len)
>  > >          kfree(iw_event->private_data);
>  > 
>  > Kfree checks for a null value, so is the private_data_len check necessary?
> 
> Could private_data be a junk pointer if private_data_len == 0 ?
> 
>  - R.


_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to