bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153)

va_end() must be called before returning.
(cherry picked from commit 59e004af63)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-02-07 00:08:10 -08:00 committed by GitHub
parent 1b8a34ae65
commit 0892a0e3ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -311,6 +311,7 @@ _setException(PyObject *exc, const char* altmsg, ...)
} else {
PyErr_FormatV(exc, altmsg, vargs);
}
va_end(vargs);
return NULL;
}
va_end(vargs);