From 47ef143bf329e8d15f0832886a6a80d77a718cd4 Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 24 Sep 2020 19:22:18 +0000 Subject: Make free_strings() NULL safe ok jsing --- src/lib/libcrypto/ui/ui_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index 06b29b8cee..27c7e5126f 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ui_lib.c,v 1.34 2018/06/02 04:45:21 tb Exp $ */ +/* $OpenBSD: ui_lib.c,v 1.35 2020/09/24 19:22:18 tb Exp $ */ /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL * project 2001. */ @@ -99,6 +99,8 @@ UI_new_method(const UI_METHOD *method) static void free_string(UI_STRING *uis) { + if (uis == NULL) + return; if (uis->flags & OUT_STRING_FREEABLE) { free((char *) uis->out_string); switch (uis->type) { -- cgit v1.2.3-55-g6feb