rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
74 stars 91 forks source link

Fix termination of va_list in lr_metadatatarget_append_error() #260

Closed lukash closed 2 years ago

lukash commented 2 years ago

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.