[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH] lib/vfscore: fix memory leak at sys_write



Thanks for the patch. Good catch.

Reviewed-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>

> On 20. Feb 2019, at 18:38, Yuri Volchkov <yuri.volchkov@xxxxxxxxx> wrote:
> 
> Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
> ---
> lib/vfscore/syscalls.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/lib/vfscore/syscalls.c b/lib/vfscore/syscalls.c
> index ee7f7fde..7931d34b 100644
> --- a/lib/vfscore/syscalls.c
> +++ b/lib/vfscore/syscalls.c
> @@ -333,6 +333,8 @@ sys_write(struct vfscore_file *fp, const struct iovec 
> *iov, size_t niov,
>       uio.uio_rw = UIO_WRITE;
>       vfs_write(fp, &uio, (offset == -1) ? 0 : FOF_OFFSET);
>       *count = bytes - uio.uio_resid;
> +
> +     free(copy_iov);
>       return error;
> }
> 
> -- 
> 2.19.2
> 


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.