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

@@ -144,12 +144,15 @@ bad:
goto end;
}
fwrite(crl, crl_len, 1, outfp);
if (fwrite(crl, crl_len, 1, outfp) != 1) {
error_print();
goto end;
}
ret = 0;
end:
if (cert) free(cert);
if (crl) free(crl);
if (outfile && outfp) fclose(outfp);
return ret;
}