[Openchrome-devel] [Bug 93675] Segfault in xf86DestroyI2CDevRec

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 1 21:44:35 PST 2016


https://bugs.freedesktop.org/show_bug.cgi?id=93675

--- Comment #10 from Kyle Guinn <elyk03 at gmail.com> ---
(In reply to Kevin Brace from comment #8)
> If you take out xf86DestroyI2CDevRec API call after 2 calls to
> xf86I2CProbeAddress API call, the problem seems to go away (I am not sure if
> this is okay. If it is not, let me know.).
> 
> _____________________________________________________________________________
> 
>     if (xf86I2CProbeAddress(pVia->pI2CBus3, pDev->SlaveAddr)) {
>         pDev->pI2CBus = pVia->pI2CBus3;
>     } else if (xf86I2CProbeAddress(pVia->pI2CBus2, pDev->SlaveAddr)) {
>         pDev->pI2CBus = pVia->pI2CBus2;
>     } else {
> //      xf86DestroyI2CDevRec(pDev, TRUE);
>         return;
>     }

Yes, that's the same offending line that I found.  Removing the
xf86DestroyI2CDevRec call should fix it (haven't tried it myself) but it will
result in a memory leak (Create without a matching Destroy).  That's why I
decided to patch xf86DestroyI2CDevRec to handle this better.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/openchrome-devel/attachments/20160202/b98fc05b/attachment.html>


More information about the Openchrome-devel mailing list