]> granicus.if.org Git - curl/commit
cookies: fix leak when writing cookies to file
authorDaniel Gustafsson <daniel@yesql.se>
Sat, 8 Sep 2018 20:23:33 +0000 (22:23 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Sep 2018 06:31:11 +0000 (08:31 +0200)
commit6e054623b462494c26bbaf46da7ba4b5f40ff285
tree09d65fb4edf1865efde0953a9aa7e9e04ade8fc8
parentc3654df166ff9bded751809af4ce6a3b1d7b0f81
cookies: fix leak when writing cookies to file

If the formatting fails, we error out on a fatal error and
clean up on the way out. The array was however freed within
the wrong scope and was thus never freed in case the cookies
were written to a file instead of STDOUT.

Closes #2957
lib/cookie.c