diff options
author | Nick Zitzmann <nickzman@gmail.com> | 2013-07-02 19:40:14 -0600 |
---|---|---|
committer | Nick Zitzmann <nickzman@gmail.com> | 2013-07-02 19:40:14 -0600 |
commit | 833fba265dfeb4f675d233952e9fe9e65ddfbba4 (patch) | |
tree | e33e9ce79cadbea1b48d6f694e05a16b6f1dff80 /tests/libtest | |
parent | d633052905d430565db47d22dfc42011a3ca2c01 (diff) | |
parent | 009d2336fe23329dc19af4bf958be412c1072f15 (diff) |
Merge branch 'master' of https://github.com/bagder/curl
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/lib506.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c index bddda128c..4d2864de9 100644 --- a/tests/libtest/lib506.c +++ b/tests/libtest/lib506.c @@ -149,11 +149,11 @@ int test(char *URL) { int res; CURLSHcode scode = CURLSHE_OK; - char *url; + char *url = NULL; struct Tdata tdata; CURL *curl; CURLSH *share; - struct curl_slist *headers; + struct curl_slist *headers = NULL; int i; struct userdata user; @@ -286,9 +286,12 @@ test_cleanup: /* clean up last handle */ printf( "CLEANUP\n" ); curl_easy_cleanup( curl ); - curl_slist_free_all( headers ); - curl_free(url); + if ( headers ) + curl_slist_free_all( headers ); + + if ( url ) + curl_free(url); /* free share */ printf( "SHARE_CLEANUP\n" ); |