mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
util: xml: 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
9a063f5c26
commit
344415a306
@ -696,8 +696,8 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSED, ...)
|
||||
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
|
||||
int domcode = VIR_FROM_XML;
|
||||
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||
char *contextstr = NULL;
|
||||
char *pointerstr = NULL;
|
||||
g_autofree char *contextstr = NULL;
|
||||
g_autofree char *pointerstr = NULL;
|
||||
|
||||
|
||||
/* conditions for error printing */
|
||||
@ -763,9 +763,6 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSED, ...)
|
||||
contextstr,
|
||||
pointerstr);
|
||||
}
|
||||
|
||||
VIR_FREE(contextstr);
|
||||
VIR_FREE(pointerstr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user