scsi: sr: Add memory allocation failure handling for get_capabilities()
The function get_capabilities() has the possibility of failing to allocate the transfer buffer but it does not currently handle this. This may lead to exceptions when accessing the buffer. Add error handling when memory allocation fails. Link: https://lore.kernel.org/r/20220427025647.298358-1-lienze@kylinos.cnSigned-off-by:Enze Li <lienze@kylinos.cn> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com>
Showing
Please register or sign in to comment