New Defects reported by Coverity Scan for libvirt
by scan-admin@coverity.com
Hi,
Please find the latest report on new defect(s) introduced to libvirt found with Coverity Scan.
1 new defect(s) introduced to libvirt found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 438781: Resource leaks (RESOURCE_LEAK)
/tests/vircgroupmock.c: 623 in __open_2()
________________________________________________________________________________________________________
*** CID 438781: Resource leaks (RESOURCE_LEAK)
/tests/vircgroupmock.c: 623 in __open_2()
617 if (STRPREFIX(path, SYSFS_CGROUP_PREFIX)) {
618 init_sysfs();
619 if (asprintf(&newpath, "%s%s",
620 fakesysfscgroupdir,
621 path + strlen(SYSFS_CGROUP_PREFIX)) < 0) {
622 errno = ENOMEM;
>>> CID 438781: Resource leaks (RESOURCE_LEAK)
>>> Variable "newpath" going out of scope leaks the storage it points to.
623 return -1;
624 }
625 }
626
627 ret = real___open_2(newpath ? newpath : path, flags);
628
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy...