[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Leak in xc_dom_load_hvm_kernel() (Was; Re: New Defects reported by Coverity Scan for XenProject)
Roger, On Tue, 2016-02-02 at 20:23 -0800, scan-admin@xxxxxxxxxxxx wrote: > ** CID 1351227:ÂÂÂ (RESOURCE_LEAK) > /tools/libxc/xc_dom_hvmloader.c: 260 in xc_dom_load_hvm_kernel() > /tools/libxc/xc_dom_hvmloader.c: 270 in xc_dom_load_hvm_kernel() > /tools/libxc/xc_dom_hvmloader.c: 277 in xc_dom_load_hvm_kernel() Looks like this came fromÂad787bafcd2a3058f0f37f2fe84931bd5136bde9? > ________________________________________________________________________________________________________ > *** CID 1351227:ÂÂÂ (RESOURCE_LEAK) > /tools/libxc/xc_dom_hvmloader.c: 260 in xc_dom_load_hvm_kernel() > 254ÂÂÂÂÂÂÂÂ elf->dest_size = pages * XC_DOM_PAGE_SIZE(dom); > 255ÂÂÂÂÂ > 256ÂÂÂÂÂÂÂÂ rc = elf_load_binary(elf); > 257ÂÂÂÂÂÂÂÂ if ( rc < 0 ) > 258ÂÂÂÂÂÂÂÂ { > 259ÂÂÂÂÂÂÂÂÂÂÂÂ DOMPRINTF("%s: failed to load elf binary", __func__); > >>>ÂÂÂÂ CID 1351227:ÂÂÂ (RESOURCE_LEAK) > >>>ÂÂÂÂ Variable "entries" going out of scope leaks the storage it points to. > 260ÂÂÂÂÂÂÂÂÂÂÂÂ return rc; > 261ÂÂÂÂÂÂÂÂ } > 262ÂÂÂÂÂ > 263ÂÂÂÂÂÂÂÂ munmap(elf->dest_base, elf->dest_size); > 264ÂÂÂÂÂ > 265ÂÂÂÂÂÂÂÂ rc = modules_init(dom, dom->total_pages << PAGE_SHIFT, elf, > &m_start, > /tools/libxc/xc_dom_hvmloader.c: 270 in xc_dom_load_hvm_kernel() > 264ÂÂÂÂÂ > 265ÂÂÂÂÂÂÂÂ rc = modules_init(dom, dom->total_pages << PAGE_SHIFT, elf, > &m_start, > 266ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ &m_end); > 267ÂÂÂÂÂÂÂÂ if ( rc != 0 ) > 268ÂÂÂÂÂÂÂÂ { > 269ÂÂÂÂÂÂÂÂÂÂÂÂ DOMPRINTF("%s: insufficient space to load modules.", > __func__); > >>>ÂÂÂÂ CID 1351227:ÂÂÂ (RESOURCE_LEAK) > >>>ÂÂÂÂ Variable "entries" going out of scope leaks the storage it points to. > 270ÂÂÂÂÂÂÂÂÂÂÂÂ return rc; > 271ÂÂÂÂÂÂÂÂ } > 272ÂÂÂÂÂ > 273ÂÂÂÂÂÂÂÂ rc = loadmodules(dom, m_start, m_end, dom->guest_domid); > 274ÂÂÂÂÂÂÂÂ if ( rc != 0 ) > 275ÂÂÂÂÂÂÂÂ { > /tools/libxc/xc_dom_hvmloader.c: 277 in xc_dom_load_hvm_kernel() > 271ÂÂÂÂÂÂÂÂ } > 272ÂÂÂÂÂ > 273ÂÂÂÂÂÂÂÂ rc = loadmodules(dom, m_start, m_end, dom->guest_domid); > 274ÂÂÂÂÂÂÂÂ if ( rc != 0 ) > 275ÂÂÂÂÂÂÂÂ { > 276ÂÂÂÂÂÂÂÂÂÂÂÂ DOMPRINTF("%s: unable to load modules.", __func__); > >>>ÂÂÂÂ CID 1351227:ÂÂÂ (RESOURCE_LEAK) > >>>ÂÂÂÂ Variable "entries" going out of scope leaks the storage it points to. > 277ÂÂÂÂÂÂÂÂÂÂÂÂ return rc; > 278ÂÂÂÂÂÂÂÂ } > 279ÂÂÂÂÂ > 280ÂÂÂÂÂÂÂÂ dom->parms.phys_entry = elf_uval(elf, elf->ehdr, e_entry); > 281ÂÂÂÂÂ > 282ÂÂÂÂÂÂÂÂ free(entries); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |