diff options
author | Florian Pritz <bluewind@xinu.at> | 2012-09-22 10:26:41 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2012-09-22 10:27:41 +0200 |
commit | 7f65005a8956617d26c874705ef79e994f1b63da (patch) | |
tree | b6d56edfd6a616d5af6f045a2f170d254252d748 /fb-helper.c | |
parent | f1cc950fbf97cc9e6c3e565de625bb9bc464470a (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.c | 5 |
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); |