[Bugs] [Bug 789278] Issues reported by Coverity static analysis tool

bugzilla at redhat.com bugzilla at redhat.com
Wed Apr 1 06:08:28 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=789278



--- Comment #528 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/10068 committed in master by Vijay Bellur
(vbellur at redhat.com) 
------
commit 562cdace9152add786f156e38dc3fbc8805a69b7
Author: Michael Adam <obnox at samba.org>
Date:   Tue Mar 31 12:30:06 2015 +0200

    features/trash: fix storing/wiping of eliminate path (coverity)

    Functions store_eliminate_path() and wipe_eliminate_path() take
    eliminate as a plain pointer not pointer to pointer. Hence
    store_eliminate_path fails to hand the allocated and filled
    eliminate data out to the caller (in particular leaking memory),
    and wipe_eliminate_path() fails to NULL the freed eliminate path.

    This leads to several leak and access after free errors found
    by Coverity. This patch fixes the issue by handing in eliminate
    by reference and in the case of wipe_eliminate path, also NULLing
    out the free'd pointer.

    This fixes the following coverity IDs:

    CID 1288759
    CID 1288790

    Change-Id: I7520ae42c5f6e369a145bea67b4ff95b75d2ae73
    BUG: 789278
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-on: http://review.gluster.org/10068
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Anoop C S <achiraya at redhat.com>
    Reviewed-by: Vijay Bellur <vbellur at redhat.com>

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Bugs mailing list