diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2014-08-26 12:59:47 +0530 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2014-08-27 06:46:38 -0700 |
commit | f0ddba7e0913db505f1295e9b3b7d35ead9c4407 (patch) | |
tree | ad28e42375e834b0c5cb97a3e68000e187e4dd73 /libglusterfs/src/circ-buff.h | |
parent | 1679b72c5b023884fb4bc6a2a85b06016fb3cab8 (diff) |
cluster/afr: Fix memory leak of file-path in self-heal-daemon
Backport of http://review.gluster.org/4790
Note: Only the part which fixes the memory leak is backported
shd event has path which needs to be freed as part of circular buffer cleanup.
This patch introduces the functionality so that self-heal-daemon can use it.
Change-Id: I3f3823d5587eda2fcb278f0fdb89123a31c9d786
BUG: 1119894
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8541
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'libglusterfs/src/circ-buff.h')
-rw-r--r-- | libglusterfs/src/circ-buff.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libglusterfs/src/circ-buff.h b/libglusterfs/src/circ-buff.h index 5b5acc387bf..e3459f5e3d0 100644 --- a/libglusterfs/src/circ-buff.h +++ b/libglusterfs/src/circ-buff.h @@ -38,7 +38,7 @@ struct _buffer { /* indicates the amount of circular buffer used. */ circular_buffer_t **cb; - + void (*destroy_buffer_data) (void *data); pthread_mutex_t lock; }; @@ -51,7 +51,8 @@ void cb_buffer_show (buffer_t *buffer); buffer_t * -cb_buffer_new (size_t buffer_size,gf_boolean_t use_buffer_once); +cb_buffer_new (size_t buffer_size,gf_boolean_t use_buffer_once, + void (*destroy_data) (void *data)); void cb_buffer_destroy (buffer_t *buffer); |