Skip to content
Snippets Groups Projects
Commit 009d2336 authored by Marc Hoersken's avatar Marc Hoersken
Browse files

lib506.c: Fixed possible use of uninitialized variables

parent abca89aa
No related branches found
No related tags found
No related merge requests found
......@@ -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" );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment