lib506.c: Fixed possible use of uninitialized variables

This commit is contained in:
Marc Hoersken 2013-07-01 21:42:15 +02:00
parent abca89aaa0
commit 009d2336fe
1 changed files with 7 additions and 4 deletions

View File

@ -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" );