From: Peter Krempa Date: Mon, 1 Feb 2021 11:08:13 +0000 (+0100) Subject: hypervFreeInvokeParams: Don't use VIR_DISPOSE_N for freeing 'params' X-Git-Tag: v7.1.0-rc1~330 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c9423a1e8130f120edeadab08ad7499b59de501;p=thirdparty%2Flibvirt.git hypervFreeInvokeParams: Don't use VIR_DISPOSE_N for freeing 'params' The struct doesn't contain any secrets to clear before freeing and even if it did VIR_DISPOSE_N wouldn't help as the struct contains only pointers thus the actual memory pointing to isn't sanitized. Just free the params array pointer and then the struct itself. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrangé --- diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index c14ff0e64a..8bb6f591f1 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -184,8 +184,8 @@ hypervFreeInvokeParams(hypervInvokeParamsListPtr params) } } - VIR_DISPOSE_N(params->params, params->nbAvailParams); - VIR_FREE(params); + g_free(params->params); + g_free(params); }