summaryrefslogtreecommitdiffstats
path: root/lib/gopher.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gopher.c')
-rw-r--r--lib/gopher.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gopher.c b/lib/gopher.c
index a073d0b..e6d2746 100644
--- a/lib/gopher.c
+++ b/lib/gopher.c
@@ -78,7 +78,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
curl_off_t *bytecount = &data->req.bytecount;
char *path = data->state.path;
- char *sel;
+ char *sel = NULL;
char *sel_org = NULL;
ssize_t amount, k;
size_t len;
@@ -106,8 +106,8 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
/* ... and finally unescape */
result = Curl_urldecode(data, newp, 0, &sel, &len, FALSE);
- if(!sel)
- return CURLE_OUT_OF_MEMORY;
+ if(result)
+ return result;
sel_org = sel;
}