From: Daniel Stenberg Date: Mon, 18 Feb 2019 11:29:23 +0000 (+0100) Subject: unit1651: survive curl_easy_init() fails X-Git-Tag: curl-7_64_1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5908e900be1ec3c890e5557bfc7347fabd834ed3;p=thirdparty%2Fcurl.git unit1651: survive curl_easy_init() fails --- diff --git a/tests/unit/unit1651.c b/tests/unit/unit1651.c index fcd3b54db0..db3a0f35b3 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