6781d5b qemu_capabilities: Resolve Coverity RESOURCE_LEAK

1 file Authored by Wang Rui 9 years ago, Committed by Ján Tomko 9 years ago,
    qemu_capabilities: Resolve Coverity RESOURCE_LEAK
    
    In function virQEMUCapsParseMachineTypesStr, VIR_STRNDUP allocates
    memory for 'name' in {do,while} loop. If 'name' isn't freed before
    'continue', its memory will be allocated again in the next loop.
    In this case the memory allocated for 'name' in privious loop is
    useless and not freed. Free it before continue this loop to fix that.
    
    Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
    
        
file modified
+3 -1