Re: [PATCH] lpfc: fix memory leak and NULL dereference

2015-10-12 Thread James Smart
Looks Good - Thank you Sudip. Reviewed-by: James Smart -- james s On 9/23/2015 6:32 AM, Sudip Mukherjee wrote: kmalloc() can return NULL and without checking we were dereferencing it. Moreover if kmalloc succeeds but the function fails in other parts then we were returning the error code but

Re: [PATCH] lpfc: fix memory leak and NULL dereference

2015-10-08 Thread Sudip Mukherjee
On Wed, Sep 23, 2015 at 07:02:32PM +0530, Sudip Mukherjee wrote: > kmalloc() can return NULL and without checking we were dereferencing it. > Moreover if kmalloc succeeds but the function fails in other parts then > we were returning the error code but we missed freeing lcb_context. > While at it f

[PATCH] lpfc: fix memory leak and NULL dereference

2015-09-23 Thread Sudip Mukherjee
kmalloc() can return NULL and without checking we were dereferencing it. Moreover if kmalloc succeeds but the function fails in other parts then we were returning the error code but we missed freeing lcb_context. While at it fixed one related checkpatch warning. Signed-off-by: Sudip Mukherjee ---