Fix return without clean

This commit is contained in:
Zhi Guan
2026-06-17 16:06:11 +08:00
parent 4831f5a549
commit ea35a8cea3
13 changed files with 22 additions and 17 deletions

View File

@@ -101,7 +101,7 @@ int sm9keygen_main(int argc, char **argv)
} else {
bad:
fprintf(stderr, "%s: illegal option '%s'\n", prog, *argv);
return 1;
goto end;
}
@@ -147,5 +147,5 @@ end:
gmssl_secure_clear(&enc_key, sizeof(enc_key));
if (infile && infp) fclose(infp);
if (outfile && outfp) fclose(outfp);
return 1;
return ret;
}