summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-03-04 13:08:44 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-03-04 13:08:44 +0100
commit34cd05fc52ad364f43554cb72ef7e1c087c8d4f8 (patch)
treefdbc4a19f47d2270904690aa8ee5de686ff05b8e
parent646c6eb6854b2f1ea134e6cc58fdf6406d4cade1 (diff)
downloadcurl-34cd05fc52ad364f43554cb72ef7e1c087c8d4f8.tar.gz
fixup use an assert for pathbagder/gopher-path-null
-rw-r--r--lib/gopher.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gopher.c b/lib/gopher.c
index 2b2683573..b296c62d1 100644
--- a/lib/gopher.c
+++ b/lib/gopher.c
@@ -79,7 +79,6 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
struct Curl_easy *data = conn->data;
curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
char *gopherpath;
- /* path is guaranteed non-NULL */
char *path = data->state.up.path;
char *query = data->state.up.query;
char *sel = NULL;
@@ -89,6 +88,9 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
*done = TRUE; /* unconditionally */
+ /* path is guaranteed non-NULL */
+ DEBUGASSERT(path);
+
if(query)
gopherpath = aprintf("%s?%s", path, query);
else