Skip to content

Commit

Permalink
Staging: bcm: Fix memory leak reported during compile.
Browse files Browse the repository at this point in the history
This patch fixes a potential memory leak were temp_buff buffer
is not being freed when a certain condition is true.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Kevin McKinney authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent fbfcdf2 commit 1dc6347
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/bcm/Bcmchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "RDM Done On invalid Address : %x Access Denied.\n",
(int)sRdmBuffer.Register);

kfree(temp_buff);
return -EINVAL;
}

Expand Down

0 comments on commit 1dc6347

Please sign in to comment.