Although the three functions esxFreePrivate(), esxFreeStreamPrivate(),
and esxUtil_FreeParsedUri() are calling VIR_FREE on *object, and so in
theory the caller of the function might rely on "object" (the free
function's arg) being set to NULL, in practice these functions are
only called from a couple places each, and in all cases the pointer
that is passed is a local variable, and goes out of scope almost
immediately after calling the Free function, so it is safe to change
VIR_FREE() into g_free().
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
esxUtil_FreeParsedUri(&(*priv)->parsedUri);
virObjectUnref((*priv)->caps);
virObjectUnref((*priv)->xmlopt);
- VIR_FREE(*priv);
+ g_free(*priv);
}
return;
esxVI_CURL_Free(&(*priv)->curl);
- VIR_FREE((*priv)->backlog);
- VIR_FREE(*priv);
+ g_free((*priv)->backlog);
+ g_free(*priv);
}
static int
if (!parsedUri || !(*parsedUri))
return;
- VIR_FREE((*parsedUri)->transport);
- VIR_FREE((*parsedUri)->vCenter);
- VIR_FREE((*parsedUri)->proxy_hostname);
- VIR_FREE((*parsedUri)->path);
+ g_free((*parsedUri)->transport);
+ g_free((*parsedUri)->vCenter);
+ g_free((*parsedUri)->proxy_hostname);
+ g_free((*parsedUri)->path);
- VIR_FREE(*parsedUri);
+ g_free(*parsedUri);
}