summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2015-03-31 12:30:06 +0200
committerVijay Bellur <vbellur@redhat.com>2015-03-31 23:08:23 -0700
commit562cdace9152add786f156e38dc3fbc8805a69b7 (patch)
tree758c327eb3ba017ebdcd8add5d423e8f104e45ec /libglusterfs/src
parentf5e4c943cf520c6ec2df3c231fef9ae4116097b8 (diff)
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@samba.org> Reviewed-on: http://review.gluster.org/10068 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anoop C S <achiraya@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src')
0 files changed, 0 insertions, 0 deletions