On 09/08/2018 13:44, Marc-André Lureau wrote:
>
> I suppose megasas_complete_command() should take care of destroying
> the sglist instead, so I leave that patch as RFC for now.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
megasas_complete_command() is already doing it, and it calls
megasas_unmap_frame, so it is okay to remove the qemu_sglist_destroy
from there and move it to megasas_unmap_frame. Thanks!
Paolo
> ---
> hw/scsi/megasas.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
> index ba1afa3c1e..2a16397b3b 100644
> --- a/hw/scsi/megasas.c
> +++ b/hw/scsi/megasas.c
> @@ -465,6 +465,7 @@ static void megasas_unmap_frame(MegasasState *s, MegasasCmd *cmd)
> cmd->pa = 0;
> cmd->pa_size = 0;
> clear_bit(cmd->index, s->frame_map);
> + qemu_sglist_destroy(&cmd->qsg);
> }
>
> /*
> -- 2.18.0.547.g1d89318c48