From 5908e900be1ec3c890e5557bfc7347fabd834ed3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 18 Feb 2019 12:29:23 +0100 Subject: unit1651: survive curl_easy_init() fails --- tests/unit/unit1651.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/unit1651.c b/tests/unit/unit1651.c index fcd3b54db..db3a0f35b 100644 --- a/tests/unit/unit1651.c +++ b/tests/unit/unit1651.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2018, Daniel Stenberg, , et al. + * Copyright (C) 2018 - 2019, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -352,6 +352,8 @@ UNITTEST_START struct Curl_easy *data = curl_easy_init(); int i; int byte; + if(!data) + return 2; memset(&conn, 0, sizeof(struct connectdata)); /* this is a lot of assuming, but we expect the parsing function to only -- cgit v1.2.1