The code was a mix of using NULL to terminate the list of args but then passing the va_list to format, where the NULL was extraneous. Instead, use g_strdup_vprintf() which does it correctly. Also fixes a memory leak of the strings not being freed.
However, this code is not used in dnf at all, hard to tell if anyone is using it or if it's even functional.
The code was a mix of using
NULL
to terminate the list of args but then passing theva_list
to format, where theNULL
was extraneous. Instead, useg_strdup_vprintf()
which does it correctly. Also fixes a memory leak of the strings not being freed.However, this code is not used in dnf at all, hard to tell if anyone is using it or if it's even functional.