diff --git a/src/openvpn/ssl_verify.c b/src/openvpn/ssl_verify.c
index 04ef27e..446c4a7 100644
--- a/src/openvpn/ssl_verify.c
+++ b/src/openvpn/ssl_verify.c
@@ -992,7 +992,7 @@
     const char *apf = platform_create_temp_file(opt->tmp_dir, "apf", &gc);
     const char *afr = platform_create_temp_file(opt->tmp_dir, "afr", &gc);
 
-    if (acf && apf)
+    if (acf && apf && afr)
     {
         ads->auth_control_file = string_alloc(acf, NULL);
         ads->auth_pending_file = string_alloc(apf, NULL);
@@ -1004,7 +1004,7 @@
     }
 
     gc_free(&gc);
-    return (acf && apf);
+    return (acf && apf && afr);
 }
 
 /**
