diff options
author | vmallika <vmallika@redhat.com> | 2015-07-12 21:03:54 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2015-07-14 02:59:50 -0700 |
commit | e73db5e7fe1dba5a071725ef3480a4a1d5c7bef7 (patch) | |
tree | 84196f42075c910277099c15cf1580b53a22e469 /xlators/features/marker/src/marker.h | |
parent | d51ddfe8f8839ccb419eb2d8a7cf024d3f5fdeeb (diff) |
quota/marker: fix mem-leak in marker
Free local in error paths
Change-Id: I76f69e7d746af8eedea34354ff5a6bf50234e50e
BUG: 1207735
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/11617
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/features/marker/src/marker.h')
-rw-r--r-- | xlators/features/marker/src/marker.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker.h b/xlators/features/marker/src/marker.h index 0f98ac960a3..6e43e74d5a6 100644 --- a/xlators/features/marker/src/marker.h +++ b/xlators/features/marker/src/marker.h @@ -75,6 +75,18 @@ enum { frame->cookie = NULL; \ } while (0) +#define MARKER_STACK_UNWIND(fop, frame, params...) \ + do { \ + quota_local_t *_local = NULL; \ + if (frame) { \ + _local = frame->local; \ + frame->local = NULL; \ + } \ + STACK_UNWIND_STRICT (fop, frame, params); \ + if (_local) \ + marker_local_unref (_local); \ + } while (0) + struct marker_local{ uint32_t timebuf[2]; pid_t pid; |