From 8f7bd94cc49ba0291f95a1eef1ca3d6dd081eedf Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
Date: Tue, 13 Jan 2015 18:31:28 +0000
Subject: [PATCH] varargs cleanup (coverity)

---
 servers/slapd/back-sql/util.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/servers/slapd/back-sql/util.c b/servers/slapd/back-sql/util.c
index 3564527b6e..ce2b071abe 100644
--- a/servers/slapd/back-sql/util.c
+++ b/servers/slapd/back-sql/util.c
@@ -105,6 +105,7 @@ backsql_strcat_x( struct berbuf *dest, void *memctx, ... )
 				Debug( LDAP_DEBUG_ANY, "backsql_strcat(): "
 					"could not reallocate string buffer.\n",
 					0, 0, 0 );
+				va_end( strs );
 				return NULL;
 			}
 			dest->bb_val.bv_val = tmp_dest;
@@ -212,6 +213,7 @@ backsql_strfcat_x( struct berbuf *dest, void *memctx, const char *fmt, ... )
 				Debug( LDAP_DEBUG_ANY, "backsql_strfcat(): "
 					"could not reallocate string buffer.\n",
 					0, 0, 0 );
+				va_end( strs );
 				return NULL;
 			}
 			dest->bb_val.bv_val = tmp_dest;
-- 
GitLab