summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/dgst.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/dgst.c b/apps/dgst.c
index 8459c19625..ad2f2348ac 100644
--- a/apps/dgst.c
+++ b/apps/dgst.c
@@ -287,6 +287,11 @@ int MAIN(int argc, char **argv)
in = BIO_new(BIO_s_file());
bmd = BIO_new(BIO_f_md());
+ if ((in == NULL) || (bmd == NULL)) {
+ ERR_print_errors(bio_err);
+ goto end;
+ }
+
if (debug) {
BIO_set_callback(in, BIO_debug_callback);
/* needed for windows 3.1 */
@@ -298,11 +303,6 @@ int MAIN(int argc, char **argv)
goto end;
}
- if ((in == NULL) || (bmd == NULL)) {
- ERR_print_errors(bio_err);
- goto end;
- }
-
if (out_bin == -1) {
if (keyfile)
out_bin = 1;