if (session->commands) {
g_ptr_array_free(session->commands, TRUE);
+ session->commands = NULL;
}
if (session->results) {
g_ptr_array_free(session->results, TRUE);
+ session->results = NULL;
}
/* Only cleanup fd and ev_watcher for UDP sessions */
/* Check pending timeouts for all requests in this rule (periodic check) */
fuzzy_tcp_check_pending_timeouts(session->rule, now);
+ if (session->commands == NULL) {
+ return;
+ }
/* Check if all commands have been replied */
for (i = 0; i < session->commands->len; i++) {