ypldap(8): Fix absent va_end() in 'goto fail' path

In this path, we used va_start() without pairing it with va_end().  Add the
va_end().  (va_start() without paired va_end() is undefined behavior per the C
standard.)

"In many implementations, [va_end] is a do-nothing operation; but those
implementations that need it probably need it badly." - Rationale for the ANSI
C Programming Language, § 4.8.1.3.

Reported by:	Coverity
CID:		1340539
This commit is contained in:
Conrad Meyer 2020-01-29 05:59:22 +00:00
parent 9106fb165b
commit 446bb222fb

View File

@ -621,6 +621,7 @@ ber_printf_elements(struct ber_element *ber, char *fmt, ...)
return (ber);
fail:
va_end(ap);
return (NULL);
}