diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-02-18 12:29:23 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-02-19 09:08:28 +0100 |
commit | 5908e900be1ec3c890e5557bfc7347fabd834ed3 (patch) | |
tree | cfdc7f84bb338e1f09a95b4ae8d043aa295b9142 | |
parent | 21b33b9a0b505a16027ca0c6de998b36e55d1ece (diff) |
unit1651: survive curl_easy_init() fails
-rw-r--r-- | tests/unit/unit1651.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, <daniel@haxx.se>, et al. + * Copyright (C) 2018 - 2019, Daniel Stenberg, <daniel@haxx.se>, 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 |