url: use goto in create_conn() for exception handling
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 19 Aug 2013 07:38:08 +0000 (00:38 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 20 Aug 2013 09:16:38 +0000 (11:16 +0200)
commit53333a43a1959ddeef27c26f0983be1b81e558bc
tree589abdadbfaa5c9364bf58b63ad54ddc8a790227
parentc56f9797e7feb7c2dc93bc389d4b85cc75220d77
url: use goto in create_conn() for exception handling

Instead of remembering before each "return" statement which temporary
allocations, if any, need to be freed, take care to set pointers to
NULL when no longer needed and use a goto to a common block to exit
the function and free all temporaries.

No functional change intended.  Currently the only temporary buffer in
this function is "proxy" which is already correctly freed when
appropriate, but there will be more soon.
lib/url.c