1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

util: log: convert pointers to use g_autofree

Signed-off-by: Barrett Schonefeld <bschoney@utexas.edu>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Barrett Schonefeld 2020-11-23 16:09:35 -06:00 committed by Ján Tomko
parent cf751a5feb
commit 8e9598dcad

View File

@ -505,8 +505,8 @@ virLogVMessage(virLogSourcePtr source,
va_list vargs)
{
static bool logInitMessageStderr = true;
char *str = NULL;
char *msg = NULL;
g_autofree char *str = NULL;
g_autofree char *msg = NULL;
char timestamp[VIR_TIME_STRING_BUFLEN];
size_t i;
int saved_errno = errno;
@ -603,8 +603,6 @@ virLogVMessage(virLogSourcePtr source,
virLogUnlock();
cleanup:
VIR_FREE(str);
VIR_FREE(msg);
errno = saved_errno;
}