mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
[curl] Do not cleanup twice at exit
This commit is contained in:
parent
d0679383c6
commit
5a6f56f1d3
@ -37,6 +37,7 @@
|
||||
#include "config/options.h"
|
||||
#include "intl/libintl.h"
|
||||
#include "main/select.h"
|
||||
#include "main/main.h"
|
||||
#include "main/module.h"
|
||||
#include "network/connection.h"
|
||||
#include "network/progress.h"
|
||||
@ -383,8 +384,11 @@ done_ftpes(struct connection *conn)
|
||||
if (!ftp || !ftp->easy) {
|
||||
return;
|
||||
}
|
||||
curl_multi_remove_handle(g.multi, ftp->easy);
|
||||
curl_easy_cleanup(ftp->easy);
|
||||
|
||||
if (!program.terminate) {
|
||||
curl_multi_remove_handle(g.multi, ftp->easy);
|
||||
curl_easy_cleanup(ftp->easy);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "config/options.h"
|
||||
#include "intl/libintl.h"
|
||||
#include "main/select.h"
|
||||
#include "main/main.h"
|
||||
#include "main/module.h"
|
||||
#include "network/connection.h"
|
||||
#include "network/progress.h"
|
||||
@ -116,8 +117,10 @@ done_http_curl(struct connection *conn)
|
||||
if (!http || !http->easy) {
|
||||
return;
|
||||
}
|
||||
curl_multi_remove_handle(g.multi, http->easy);
|
||||
curl_easy_cleanup(http->easy);
|
||||
if (!program.terminate) {
|
||||
curl_multi_remove_handle(g.multi, http->easy);
|
||||
curl_easy_cleanup(http->easy);
|
||||
}
|
||||
done_string(&http->headers);
|
||||
done_string(&http->post_headers);
|
||||
mem_free_if(http->post_buffer);
|
||||
|
Loading…
Reference in New Issue
Block a user