lkml.org 
[lkml]   [2021]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] scsi: scsi_debug: don't call kcalloc if size arg is zero
From
Date

George,

> If the size arg to kcalloc() is zero, it returns ZERO_SIZE_PTR.
> Because of that, for a following NULL pointer check to work on the
> returned pointer, kcalloc() must not be called with the size arg equal
> to zero. Return early without error before the kcalloc() call if size
> arg is zero.

Applied to 5.16/scsi-staging, thanks!

--
Martin K. Petersen Oracle Linux Engineering

\
 
 \ /
  Last update: 2021-11-05 04:44    [W:0.080 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site