Skip to content

Commit

Permalink
Merge pull request #781 from Marsman1996/master
Browse files Browse the repository at this point in the history
dlt_jnpr_ether_cleanup: check subctx before cleanup
  • Loading branch information
fklassen authored Jun 4, 2023
2 parents bcb107a + e831aad commit 7aca59e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ dlt_jnpr_ether_cleanup(tcpeditdlt_t *ctx)
jnpr_ether_config_t *config;

config = (jnpr_ether_config_t *)ctx->encoder->config;
tcpedit_dlt_cleanup(config->subctx);
if (config->subctx != NULL)
tcpedit_dlt_cleanup(config->subctx);
safe_free(plugin->config);
plugin->config = NULL;
plugin->config_size = 0;
Expand Down

0 comments on commit 7aca59e

Please sign in to comment.