Correction to vba ctx cleanup logic to prevent possible null dereference.

pull/111/head
Micah Snyder 7 years ago
parent b849df5cd1
commit 28d0940ff3
  1. 10
      sigtool/vba.c

@ -150,12 +150,12 @@ void destroy_ctx(int desc, cli_ctx *ctx)
close(desc);
if (NULL != ctx) {
if (NULL != *(ctx->fmap)) {
funmap(*(ctx->fmap));
*(ctx->fmap) = NULL;
}
if (NULL != ctx->fmap) {
if (NULL != *(ctx->fmap)) {
funmap(*(ctx->fmap));
*(ctx->fmap) = NULL;
}
free(ctx->fmap);
ctx->fmap = NULL;
}

Loading…
Cancel
Save