[PATCH] Call slave_destroy in scsi_alloc_sdev error path
This patch fixes a potential memory leak in scsi_alloc_sdev. If slave_alloc kmallocs memory and the get_device() (around line 245) fails then we goto the error path. The error path never calls slave_destroy.
Showing
Please register or sign in to comment