From f08f5bfef923259fe6de6d41a0a2b1b9140fc547 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 23 Feb 2017 23:24:42 +0100 Subject: Do not call va_end twice in _gf_log_eh Since va_end is called after the out label, we do not need to call it here, as it make va_end undefined, and thus could cause problem. And this is a error on cppcheck. Change-Id: I6e96c796bd37fa3cde989996ab93f9a438c0ee74 BUG: 789278 Signed-off-by: Michael Scherer Reviewed-on: https://review.gluster.org/16745 Smoke: Gluster Build System Tested-by: Michael Scherer NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Shyamsundar Ranganathan --- libglusterfs/src/logging.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'libglusterfs/src') diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c index 55cf2e97d2c..a8e7b96a24c 100644 --- a/libglusterfs/src/logging.c +++ b/libglusterfs/src/logging.c @@ -2292,8 +2292,6 @@ _gf_log_eh (const char *function, const char *fmt, ...) goto out; } - va_end (ap); - msg = GF_MALLOC (strlen (str1) + strlen (str2) + 1, gf_common_mt_char); if (!msg) { ret = -1; -- cgit