Fix memory leak in virDomainChrSourceDefClear()
While running qemuxml2xmltest, it was found that valgrind pointed out the following memory leak: ==21905== 26 bytes in 1 blocks are definitely lost in loss record 23 of 69 ==21905== at 0x4A069EE: malloc (vg_replace_malloc.c:270) ==21905== by 0x3E782A754D: xmlStrndup (in /usr/lib64/libxml2.so.2.7.6) ==21905== by 0x4CD986D: virDomainChrSourceDefParseXML (domain_conf.c:7233) ==21905== by 0x4CE4199: virDomainChrDefParseXML (domain_conf.c:7512) ==21905== by 0x4CFAF3F: virDomainDefParseXML (domain_conf.c:12303) ==21905== by 0x4CFB46E: virDomainDefParseNode (domain_conf.c:13031) ==21905== by 0x4CFB5E9: virDomainDefParse (domain_conf.c:12973) ==21905== by 0x41E9D8: testCompareXMLToXMLFiles (qemuxml2xmltest.c:40) ==21905== by 0x41EBAA: testCompareXMLToXMLHelper (qemuxml2xmltest.c:93) ==21905== by 0x421D21: virtTestRun (testutils.c:199) ==21905== by 0x41FCE9: mymain.part.0 (qemuxml2xmltest.c:244) ==21905== by 0x42249D: virtTestMain (testutils.c:782) ==21905== ... and 7 more
Showing
想要评论请 注册 或 登录