• N
    qemu: agent: fix unsafe agent access · aaf2992d
    Nikolay Shirokovskiy 提交于
    qemuDomainObjExitAgent is unsafe.
    
    First it accesses domain object without domain lock.
    Second it uses outdated logic that goes back to commit 79533da1 of
    year 2009 when code was quite different. (unref function
    instead of unreferencing only unlocked and disposed object
    in case of last reference and leaved unlocking to the caller otherwise).
    Nowadays this logic may lead to disposing locked object
    i guess.
    
    Another problem is that the callers of qemuDomainObjEnterAgent
    use domain object again (namely priv->agent) without domain lock.
    
    This patch address these two problems.
    
    qemuDomainGetAgent is dropped as unused.
    aaf2992d
qemu_domain.c 204.0 KB