Browse Source

gfsec-split: Do not free data prematurely.

We need to keep the secret structure around until we have called
the destroy command, if any.
master
Damien Goutte-Gattat 4 years ago
parent
commit
28eec9974e
  1. 4
      src/gfsec-split.c

4
src/gfsec-split.c

@ -396,8 +396,6 @@ main(int argc, char **argv)
errx(EXIT_FAILURE, _("Cannot write configuration file: %s"),
gfsec_error_string(c));
gfsec_secret_free(cfg);
if ( ! keep_original ) {
if ( cfg->destroy ) {
int status;
@ -411,5 +409,7 @@ main(int argc, char **argv)
err(EXIT_FAILURE, _("Cannot delete original file"));
}
gfsec_secret_free(cfg);
return EXIT_SUCCESS;
}

Loading…
Cancel
Save