Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
virLogDaemonConfig *config)
{
const char *gotmagic;
- char *wantmagic = NULL;
+ g_autofree char *wantmagic = NULL;
int ret = -1;
- char *state = NULL;
- virJSONValue *object = NULL;
+ g_autofree char *state = NULL;
+ g_autoptr(virJSONValue) object = NULL;
VIR_DEBUG("Running post-restart exec");
cleanup:
unlink(state_file);
- VIR_FREE(wantmagic);
- VIR_FREE(state);
- virJSONValueFree(object);
return ret;
}