Unverified Commit 20ea22ff authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

cookie: fix memory leak on oversized rejection

Regression brought by 2bc230de

Detected by OSS-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3513
Assisted-by: Max Dymond

Closes #1930
parent 49d75a4c
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -438,7 +438,7 @@ Curl_cookie_add(struct Curl_easy *data,
          /* too long individual name or contents, or too long combination of
          /* too long individual name or contents, or too long combination of
             name + contents. Chrome and Firefox support 4095 or 4096 bytes
             name + contents. Chrome and Firefox support 4095 or 4096 bytes
             combo. */
             combo. */
          free(co);
          freecookie(co);
          infof(data, "oversized cookie dropped, name/val %d + %d bytes\n",
          infof(data, "oversized cookie dropped, name/val %d + %d bytes\n",
                nlen, len);
                nlen, len);
          return NULL;
          return NULL;