summaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorBorislav Petkov <bp@alien8.de>2016-09-23 13:22:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-22 12:26:56 +0200
commit161cbfec102b846247b23d4addb22ae597fa5b88 (patch)
tree3a5d5d04d6d8ca58203ebf7a3426fbae2f9be7a8 /lib/test-string_helpers.c
parent24040922827859d1d69597c3bc0c31fad523fd21 (diff)
scsi: arcmsr: Simplify user_len checking
commit 4bd173c30792791a6daca8c64793ec0a4ae8324f upstream. Do the user_len check first and then the ver_addr allocation so that we can save us the kfree() on the error path when user_len is > ARCMSR_API_DATA_BUFLEN. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Marco Grassi <marco.gra@gmail.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Tomas Henzl <thenzl@redhat.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions