Re: [PATCH] vhost-user-scsi: Fix memleaks in vus_proc_req()

2020-11-24 Thread Alex Chen
On 2020/11/24 23:37, Raphael Norwitz wrote: > On Tue, Nov 24, 2020 at 9:50 AM Alex Chen wrote: >> >> The 'elem' is allocated memory in vu_queue_pop(), and it's memory should be >> freed in all error branchs after vu_queue_pop(). > > s/branchs/branches > >> In addition, in order to free 'elem' me

Re: [PATCH] vhost-user-scsi: Fix memleaks in vus_proc_req()

2020-11-24 Thread Raphael Norwitz
On Tue, Nov 24, 2020 at 9:50 AM Alex Chen wrote: > > The 'elem' is allocated memory in vu_queue_pop(), and it's memory should be > freed in all error branchs after vu_queue_pop(). s/branchs/branches > In addition, in order to free 'elem' memory outside of while(1) loop, move the > definition of

[PATCH] vhost-user-scsi: Fix memleaks in vus_proc_req()

2020-11-24 Thread Alex Chen
The 'elem' is allocated memory in vu_queue_pop(), and it's memory should be freed in all error branchs after vu_queue_pop(). In addition, in order to free 'elem' memory outside of while(1) loop, move the definition of 'elem' to the begin of vus_proc_req(). Reported-by: Euler Robot Signed-off-by: