1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 06:59:01 +00:00

Added destructor for proxy_chain_context.

This commit is contained in:
henri
2013-04-22 19:29:26 +00:00
parent 28604b63e3
commit 9084805bbf
3 changed files with 9 additions and 0 deletions

View File

@@ -281,6 +281,9 @@ void nsi_delete(nsock_iod nsockiod, int pending_response) {
nsi->pcap = NULL; nsi->pcap = NULL;
} }
#endif #endif
if (nsi->px_ctx)
proxy_chain_context_delete(nsi->px_ctx);
} }
/* Returns the ID of an nsock_iod . This ID is always unique amongst ids for a /* Returns the ID of an nsock_iod . This ID is always unique amongst ids for a

View File

@@ -175,6 +175,10 @@ struct proxy_chain_context *proxy_chain_context_new(nsock_pool nspool) {
return ctx; return ctx;
} }
void proxy_chain_context_delete(struct proxy_chain_context *ctx) {
if (ctx)
free(ctx);
}
struct proxy_parser *proxy_parser_new(const char *proxychainstr) { struct proxy_parser *proxy_parser_new(const char *proxychainstr) {
struct proxy_parser *parser; struct proxy_parser *parser;

View File

@@ -88,6 +88,7 @@ enum nsock_proxy_state {
/* ------------------- STRUCTURES ------------------- */ /* ------------------- STRUCTURES ------------------- */
struct proxy_node { struct proxy_node {
enum nsock_proxy_type px_type; enum nsock_proxy_type px_type;
@@ -127,6 +128,7 @@ struct proxy_actions {
void nsock_proxy_ev_handler(nsock_pool nspool, nsock_event nsevent, void *udata); void nsock_proxy_ev_handler(nsock_pool nspool, nsock_event nsevent, void *udata);
struct proxy_chain_context *proxy_chain_context_new(nsock_pool nspool); struct proxy_chain_context *proxy_chain_context_new(nsock_pool nspool);
void proxy_chain_context_delete(struct proxy_chain_context *ctx);
#endif /* NSOCK_PROXY_H */ #endif /* NSOCK_PROXY_H */