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:
parent
cf751a5feb
commit
8e9598dcad
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user