[PATCH] domain_conf: make virDomainDiskSetSource() void

Matt Coleman mcoleman at datto.com
Thu Nov 5 22:39:07 UTC 2020


> On Nov 5, 2020, at 3:43 PM, Matt Coleman <mcoleman at datto.com> wrote:
> 
> I also could go a bit further with this function's rewrite: the tmp 
> variable isn't actually necessary any longer since g_strdup() will 
> abort on failure. So, the function might as well be just two lines: 
> g_free() followed by g_strdup().

I realize that I was wrong about this because it does get called with 
src == def->src->path, which results in it attempting to dup 
already-freed memory.

-- 
Matt




More information about the libvir-list mailing list