From: bluhm Date: Tue, 6 Feb 2018 14:45:52 +0000 (+0000) Subject: Do not call freeaddrinfo() with a NULL parameter. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9de46b9d1aad1aa7cad438b4f35596a7fd3a4b4b;p=openbsd Do not call freeaddrinfo() with a NULL parameter. OK jsing@ --- 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;