[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v3 2/3] libxl: Remove unnecessary buffer zeroing and zalloc()
On Mon, Sep 02, 2024 at 05:38:38PM +0100, Javi Merino wrote: > When reading the console, xen overwrites the contents of the buffer, > so there is no need to zero the buffer before passing it to xen. > Instead, add a NULL at the end of the buffer. > > While we are at it, change the zalloc() of the buffer back to > malloc() as it was before bdf4131 (libxl: don't leak buf in > libxl_xen_console_read_start error handling, 2013-12-03). The comment > in that commit message says that the intent of the commit was to > change malloc+memset to zalloc(), but only for the > libxl_xen_console_reader struct, not for the buffer. > > Signed-off-by: Javi Merino <javi.merino@xxxxxxxxx> Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |