[PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread John Ferlan
Since 1e2ae2e31, changes to use the automagic free logic didn't take into account that one path uses posix_memalign and the other uses VIR_ALLOC_N - the former requires using VIR_FREE() and not g_free() to free the memory. Found by Coverity. Signed-off-by: John Ferlan --- src/util/iohelper.c |

Re: [PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread Peter Krempa
On Tue, Jun 16, 2020 at 08:07:10 -0400, John Ferlan wrote: > Since 1e2ae2e31, changes to use the automagic free logic didn't take > into account that one path uses posix_memalign and the other uses > VIR_ALLOC_N - the former requires using VIR_FREE() and not g_free() > to free the memory. I don't

Re: [PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread Daniel P . Berrangé
On Tue, Jun 16, 2020 at 08:07:10AM -0400, John Ferlan wrote: > Since 1e2ae2e31, changes to use the automagic free logic didn't take > into account that one path uses posix_memalign and the other uses > VIR_ALLOC_N - the former requires using VIR_FREE() and not g_free() > to free the memory. VIR_FR

Re: [PATCH 9/9] util: Avoid using wrong free function

2020-06-16 Thread John Ferlan
On 6/16/20 8:16 AM, Daniel P. Berrangé wrote: > On Tue, Jun 16, 2020 at 08:07:10AM -0400, John Ferlan wrote: >> Since 1e2ae2e31, changes to use the automagic free logic didn't take >> into account that one path uses posix_memalign and the other uses >> VIR_ALLOC_N - the former requires using VIR