From 904c211802e1d834ec05c21831aa5b51a416341c Mon Sep 17 00:00:00 2001 From: Danny Couture Date: Wed, 5 Jul 2017 09:55:17 -0400 Subject: fuse: memory leak fixes Fix fuse ctx memory leak in case an error occurs and the cleanup path is different than usual. Also fix a memory leak in logging if eh_save_history() fails. Cherry picked from commit 5ee383fed9f6408d303aa539dda071275021f8e4: > Change-Id: I7ec967c807b0ed91184e5b958be70702215c46c9 > BUG: 1470220 > Signed-off-by: Danny Couture > Reviewed-on: https://review.gluster.org/17759 > Reviewed-by: Niels de Vos > Smoke: Gluster Build System > Reviewed-by: N Balachandran > Reviewed-by: Prashanth Pai > Reviewed-by: Amar Tumballi > Tested-by: Amar Tumballi > CentOS-regression: Gluster Build System > Reviewed-by: Raghavendra G Change-Id: I7ec967c807b0ed91184e5b958be70702215c46c9 BUG: 1471028 Signed-off-by: Niels de Vos Reviewed-on: https://review.gluster.org/17758 Smoke: Gluster Build System CentOS-regression: Gluster Build System --- libglusterfs/src/logging.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libglusterfs/src/logging.c') diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index 55cf2e97d2c..efaa44da653 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -2304,6 +2304,8 @@ _gf_log_eh (const char *function, const char *fmt, ...) strcat (msg, str2); ret = eh_save_history (this->history, msg); + if (ret < 0) + GF_FREE (msg); out: GF_FREE (str1); -- cgit