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

2020-11-24 Thread Alex Chen
Sorry, I forgot to add the Reviewed-by information, I will send patch v3. On 2020/11/25 9:25, Alex Chen wrote: > The 'elem' is allocated memory in vu_queue_pop(), and its memory should be > freed in all error branches after vu_queue_pop(). > In addition, in order to free the 'elem' memory outside

[PATCH v2] 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 its memory should be freed in all error branches after vu_queue_pop(). In addition, in order to free the 'elem' memory outside of while(1) loop, move the definition of 'elem' to the beginning of vus_proc_req(). Reported-by: Euler Robot Signed-