]> granicus.if.org Git - curl/commitdiff
gopher: fix memory leak from 9026083ddb2a9
authorDaniel Stenberg <daniel@haxx.se>
Thu, 13 Dec 2018 14:06:17 +0000 (15:06 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Dec 2018 14:06:17 +0000 (15:06 +0100)
lib/gopher.c

index 151bac1adb8297700e31535ce4419b3a79f00a5d..485b4b79a0983652d46d0405d10fa1ac75b5663e 100644 (file)
@@ -102,6 +102,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
   if(strlen(gopherpath) <= 2) {
     sel = (char *)"";
     len = strlen(sel);
+    free(gopherpath);
   }
   else {
     char *newp;