Re: [PATCH] scsi-disk: define props in scsi_block_disk to avoid memleaks

2020-01-13 Thread Pan Nengyuan
On 1/14/2020 6:56 AM, John Snow wrote: > CC qemu-block > > On 1/13/20 1:20 AM, pannengy...@huawei.com wrote: >> From: Pan Nengyuan >> >> scsi_block_realize() use scsi_realize() to init some props, but >> these props is not defined in scsi_block_disk_properties, so they will >> not be freed. >>

Re: [PATCH] scsi-disk: define props in scsi_block_disk to avoid memleaks

2020-01-13 Thread John Snow
CC qemu-block On 1/13/20 1:20 AM, pannengy...@huawei.com wrote: > From: Pan Nengyuan > > scsi_block_realize() use scsi_realize() to init some props, but > these props is not defined in scsi_block_disk_properties, so they will > not be freed. > > This patch defines these prop in scsi_block_disk_

[PATCH] scsi-disk: define props in scsi_block_disk to avoid memleaks

2020-01-12 Thread pannengyuan
From: Pan Nengyuan scsi_block_realize() use scsi_realize() to init some props, but these props is not defined in scsi_block_disk_properties, so they will not be freed. This patch defines these prop in scsi_block_disk_properties and aslo calls scsi_unrealize to avoid memleaks, the leak stack as f