New Defects reported by Coverity Scan for libvirt-dbus
by scan-admin@coverity.com
Hi,
Please find the latest report on new defect(s) introduced to libvirt-dbus found with Coverity Scan.
2 new defect(s) introduced to libvirt-dbus found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)
** CID 1444815: Resource leaks (RESOURCE_LEAK)
/src/util.c: 177 in virtDBusUtilEncodeUUID()
________________________________________________________________________________________________________
*** CID 1444815: Resource leaks (RESOURCE_LEAK)
/src/util.c: 177 in virtDBusUtilEncodeUUID()
171 }
172
173 static gchar *
174 virtDBusUtilEncodeUUID(const gchar *uuid)
175 {
176 gchar *ret = g_strdup_printf("_%s", uuid);
>>> CID 1444815: Resource leaks (RESOURCE_LEAK)
>>> Variable "ret" going out of scope leaks the storage it points to.
177 return g_strdelimit(ret, "-", '_');
178 }
179
180 static gchar *
181 virtDBusUtilDecodeUUID(const gchar *uuid)
182 {
** CID 1444814: API usage errors (ALLOC_FREE_MISMATCH)
________________________________________________________________________________________________________
*** CID 1444814: API usage errors (ALLOC_FREE_MISMATCH)
/src/domain.c: 39 in virtDBusDomainConvertBoolArrayToGuestVcpumap()
33 setPrev = set;
34
35 if (stop)
36 break;
37 }
38
>>> CID 1444814: API usage errors (ALLOC_FREE_MISMATCH)
>>> Calling "g_autoptr_cleanup_generic_gfree" frees "ret" using "free" but it should have been freed using "g_string_free".
39 return ret->str;
40 }
41
42 struct _virtDBusDomainFSInfoList {
43 virDomainFSInfoPtr *info;
44 gint count;
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my...