{
dccp_shutdown_clients();
generic_acl_deplete(&dss->acl);
+ free_sender_status(dss);
}
/** * Obtain current MPS according to RFC 4340, sec. 14. */
{
http_shutdown_clients();
generic_acl_deplete(&hss->acl);
+ free_sender_status(hss);
}
static int queue_chunk_or_shutdown(struct sender_client *sc,
const struct lls_opt_result *acl_opt_result,
const struct lls_opt_result *listen_address_opt_result,
int default_port, int max_clients, int default_deny);
+void free_sender_status(const struct sender_status *ss);
char *generic_sender_status(struct sender_status *ss, const char *name);
void generic_com_allow(struct sender_command_data *scd,
struct sender_status *ss);
ss->default_deny = default_deny;
}
+/**
+ * Deallocate all resources allocated in \ref init_sender_status().
+ *
+ * \param ss The structure whose components should be freed.
+ *
+ * This frees the dynamically allocated parts of the structure which was
+ * initialized by an earlier call to \ref init_sender_status(). It does *not*
+ * call free(ss), though.
+ */
+void free_sender_status(const struct sender_status *ss)
+{
+ int i;
+
+ free(ss->listen_fds);
+ FOR_EACH_LISTEN_FD(i, ss)
+ free(ss->listen_addresses[i]);
+ free(ss->listen_addresses);
+}
+
/**
* Return a string containing the current status of a sender.
*