Potential problems in virFDStreamClose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virFDStreamClose calls virFDStreamFree that frees fdst, but
virFDStreamClose access fdst->lock after that.

virFDStreamClose doesn't destroy fdst->lock.

static int
virFDStreamClose(virStreamPtr st)
{
    struct virFDStreamData *fdst = st->privateData;
    int ret;

    VIR_DEBUG("st=%p", st);

    if (!fdst)
        return 0;

    virMutexLock(&fdst->lock);

    ret = virFDStreamFree(fdst);

    st->privateData = NULL;

    virMutexUnlock(&fdst->lock);

    return ret;
}

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]