summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorDanny Couture <couture.danny@gmail.com>2017-07-05 09:55:17 -0400
committerNiels de Vos <ndevos@redhat.com>2017-07-14 09:35:24 +0000
commit5ee383fed9f6408d303aa539dda071275021f8e4 (patch)
treef58304881b4693f9876b4e02b847f70093ee799d /libglusterfs/src
parente648a291b02298d2f1063cedaad9a58614ebe0ad (diff)
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. Change-Id: I7ec967c807b0ed91184e5b958be70702215c46c9 BUG: 1470220 Signed-off-by: Danny Couture <couture.danny@gmail.com> Reviewed-on: https://review.gluster.org/17759 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/logging.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 9147f2782e9..c09adecc4f1 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -2303,6 +2303,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);