Don't leak in err_set_error_data if error queue is empty.
Caught by clang scan-build. Change-Id: I16496bfc469e809348199057adfb24c33c426ccb Reviewed-on: https://boringssl-review.googlesource.com/2207 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
e2793a7189
commit
4aa86f1cdf
@ -474,6 +474,9 @@ static void err_set_error_data(char *data, int flags) {
|
||||
struct err_error_st *error;
|
||||
|
||||
if (state->top == state->bottom) {
|
||||
if (flags & ERR_FLAG_MALLOCED) {
|
||||
OPENSSL_free(data);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user