From 9de46b9d1aad1aa7cad438b4f35596a7fd3a4b4b Mon Sep 17 00:00:00 2001 From: bluhm Date: Tue, 6 Feb 2018 14:45:52 +0000 Subject: [PATCH] Do not call freeaddrinfo() with a NULL parameter. OK jsing@ --- lib/libcrypto/bio/b_sock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/bio/b_sock.c b/lib/libcrypto/bio/b_sock.c index 48f39838b34..cfa48c68602 100644 --- a/lib/libcrypto/bio/b_sock.c +++ b/lib/libcrypto/bio/b_sock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: b_sock.c,v 1.67 2017/04/30 17:54:11 beck Exp $ */ +/* $OpenBSD: b_sock.c,v 1.68 2018/02/06 14:45:52 bluhm Exp $ */ /* * Copyright (c) 2017 Bob Beck * @@ -184,7 +184,8 @@ BIO_get_accept_socket(char *host, int bind_mode) err: free(str); - freeaddrinfo(res); + if (res != NULL) + freeaddrinfo(res); if ((ret == 0) && (s != -1)) { close(s); s = -1; -- 2.20.1