cputest: Avoid use of temporary variable in DO_TEST macro

Use g_free directly to free the returned pointer from
virTestLogContentAndReset rather than store it in a temp variable which
was necessary when we only allowed VIR_FREE.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com
This commit is contained in:
Peter Krempa 2020-06-11 10:24:54 +02:00
parent 0eefd2a00a
commit 473c54e788

View File

@ -997,10 +997,8 @@ mymain(void)
flags, result \
}; \
char *testLabel; \
char *tmp; \
\
tmp = virTestLogContentAndReset(); \
VIR_FREE(tmp); \
g_free(virTestLogContentAndReset());\
\
testLabel = g_strdup_printf("%s(%s): %s", #api, \
virArchToString(arch), name); \