summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/posix.c
diff options
context:
space:
mode:
authorXavier Hernandez <xhernandez@datalab.es>2017-03-09 09:29:49 +0100
committerJeff Darcy <jdarcy@redhat.com>2017-03-11 19:52:12 -0500
commitb3ac24cdd759fb4cd2946329860bcc004f736b23 (patch)
treea13a73470fedc5be257aca76f9ff6306096d5392 /xlators/features/locks/src/posix.c
parentb9e1c911833ca1916055622e5265672d5935d925 (diff)
features/locks: Fix leak of posix_lock_t's client_uid
Change-Id: I3bc14998ed6a8841f77a004c24a456331048a521 BUG: 1428510 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: https://review.gluster.org/16838 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@gmail.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/posix.c')
-rw-r--r--xlators/features/locks/src/posix.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 5d79fa16a66..44ca5004171 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -3065,8 +3065,7 @@ out:
STACK_UNWIND_STRICT (lk, posix_lock->frame, -1, EREMOTE,
&posix_lock->user_flock, NULL);
- GF_FREE (posix_lock->client_uid);
- GF_FREE (posix_lock);
+ __destroy_lock(posix_lock);
}
return ret;
@@ -3572,8 +3571,7 @@ unlock:
STACK_UNWIND_STRICT (lk, posix_lock->frame, -1, EREMOTE,
&posix_lock->user_flock, NULL);
- GF_FREE (posix_lock->client_uid);
- GF_FREE (posix_lock);
+ __destroy_lock(posix_lock);
}
return 0;
}