summary refs log tree commit diff
path: root/init/calibrate.c
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2012-01-28 00:23:41 +0100
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 08:09:01 -0600
commit64b8aa75bc101eb73e2c76a66fb5432b4c83ffb2 (patch)
tree185dcaa9eca3df2d5ab3dce10e42527a28ca4db5 /init/calibrate.c
parente5cc6aa4b6ef34c3f054af8c61a4f73c157589c3 (diff)
downloadlinux-64b8aa75bc101eb73e2c76a66fb5432b4c83ffb2.tar.gz
[SCSI] bfa: don't leak mem in bfad_im_bsg_els_ct_request()
If 'drv_fcxp = kzalloc(sizeof(struct bfad_fcxp), GFP_KERNEL);' fails
and returns NULL, then we'll leak the memory allocated to 'bsg_fcpt'
when we jump to 'out:' and the variable subsequently goes out of
scope.

Also remove the cast of the kzalloc() return value. kzalloc() returns
a void* which is implicitly converted, so the explicit cast is
pointless.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'init/calibrate.c')
0 files changed, 0 insertions, 0 deletions