From 7f65005a8956617d26c874705ef79e994f1b63da Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 22 Sep 2012 10:26:41 +0200 Subject: fb-helper: initialise *curl and check before cleaning up Signed-off-by: Florian Pritz --- fb-helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fb-helper.c') diff --git a/fb-helper.c b/fb-helper.c index 03c200c..56e33c3 100644 --- a/fb-helper.c +++ b/fb-helper.c @@ -206,7 +206,7 @@ int progress_callback( int main(int argc, char *argv[]) { - CURL *curl; + CURL *curl = NULL; CURLcode res; struct curl_httppost *formpost = NULL; @@ -343,7 +343,8 @@ int main(int argc, char *argv[]) } cleanup: - curl_easy_cleanup(curl); + if (curl) + curl_easy_cleanup(curl); if (formpost) curl_formfree(formpost); -- cgit v1.2.3-24-g4f1b