]> granicus.if.org Git - curl/commit
netrc: free temporary strings if memory allocation fails
authorMichael Kaufmann <mail@michael-kaufmann.ch>
Wed, 10 Oct 2018 20:38:50 +0000 (22:38 +0200)
committerMichael Kaufmann <mail@michael-kaufmann.ch>
Thu, 25 Oct 2018 10:54:55 +0000 (12:54 +0200)
commitd48e6b7f9558ae2a21c74f9054221af8f5c6b607
tree45a967b90c02717f45709864f37aa43d3d76897e
parent4f2541f975c97338ef421ecfeb295d9f3894c1d8
netrc: free temporary strings if memory allocation fails

- Change the inout parameters after all needed memory has been
  allocated. Do not change them if something goes wrong.
- Free the allocated temporary strings if strdup() fails.

Closes #3122
lib/netrc.c