summaryrefslogtreecommitdiffstats
path: root/fb-helper.c
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-09-22 10:26:41 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-09-22 10:27:41 +0200
commit7f65005a8956617d26c874705ef79e994f1b63da (patch)
treeb6d56edfd6a616d5af6f045a2f170d254252d748 /fb-helper.c
parentf1cc950fbf97cc9e6c3e565de625bb9bc464470a (diff)
fb-helper: initialise *curl and check before cleaning up
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb-helper.c')
-rw-r--r--fb-helper.c5
1 files changed, 3 insertions, 2 deletions
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);