[openib-general] [Fwd: [PATCH] RDMA/iwcm: Fix memory leak]

Steve WIse swise at opengridcomputing.com
Thu Nov 9 15:05:20 PST 2006


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.





More information about the general mailing list