summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2017-02-28 15:02:18 +0100
committerShyamsundar Ranganathan <srangana@redhat.com>2017-02-28 13:26:52 -0500
commit3e66156cf202c56010bfa0c63db95ef0a5998947 (patch)
tree9e8b11dc472c81e43f36abb98c790063f704b594 /libglusterfs
parentbbb03ab1a2a9f0acc02f1d252a9bf811ba854bab (diff)
Free arg_save when malloc fail
Warning found by coverity. Change-Id: Ie755659c33a43a440dadfeb1499a2f6c08e3f625 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16788 Tested-by: Michael Scherer <misc@fedoraproject.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/mem-pool.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c
index deaf286c298..af839099ff8 100644
--- a/libglusterfs/src/mem-pool.c
+++ b/libglusterfs/src/mem-pool.c
@@ -221,6 +221,7 @@ gf_vasprintf (char **string_ptr, const char *format, va_list arg)
str = GF_MALLOC (size, gf_common_mt_asprintf);
if (str == NULL) {
/* log is done in GF_MALLOC itself */
+ va_end (arg_save);
return -1;
}
rv = vsnprintf (str, size, format, arg_save);