On Fri, 18 Aug 2023 at 16:56, Kevin Wolf <kw...@redhat.com> wrote: > > Am 27.07.2023 um 17:15 hat Peter Maydell geschrieben: > > On Thu, 27 Jul 2023 at 16:07, Peter Maydell <peter.mayd...@linaro.org> > > wrote: > > > > > > In block/iscsi.c we use a raw malloc() call, which is unusual > > > given the project standard is to use the glib memory allocation > > > functions. Document why we do so, to avoid it being converted > > > to g_malloc() by mistake. > > > > > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> > > > --- > > > There aren't many uses of raw malloc() in the codebase > > > other than third-party library sourcecode. Mostly we have > > > a comment noting when we're doing it deliberately. > > Thanks, applied to the block branch. > > > The other option here would be to use scsi_create_task(), > > if we're OK with requiring libiscsi 1.13 or better (that's > > 9 years old at this point, so should be OK...) > > I wouldn't mind either way, but since this patch exists and the other > doesn't, I'm applying this one for now.
Thanks. I think scsi_create_task() would be cleaner, but it's just over the amount of change that I'd want to do without a test setup to exercise this code, which is why I stuck to the comment for now. -- PMM