Skip to content
Snippets Groups Projects
Commit e121d68e authored by Marek Vavruša's avatar Marek Vavruša
Browse files

process_answer: clean up 'ext' when processing fails

parent e390d964
Branches
Tags
No related merge requests found
......@@ -64,9 +64,18 @@ static int process_answer_begin(knot_process_t *ctx, void *module_param)
static int process_answer_reset(knot_process_t *ctx)
{
assert(ctx);
struct answer_data *data = ANSWER_DATA(ctx);
/* Remember persistent parameters. */
struct process_answer_param *module_param = data->param;
/* Free allocated data. */
if (data->ext_cleanup != NULL) {
data->ext_cleanup(data);
}
/* Initialize persistent data. */
answer_data_init(ctx, ANSWER_DATA(ctx)->param);
answer_data_init(ctx, module_param);
/* Await packet. */
return NS_PROC_MORE;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment