$OpenBSD: patch-src_util-logopenfile_c,v 1.2 2019/04/19 12:22:27 bluhm Exp $

https://github.com/OISF/suricata/commit/4b4bb31c30339caa2c6020a7ec14bea848ba5a5d

Index: src/util-logopenfile.c
--- src/util-logopenfile.c.orig
+++ src/util-logopenfile.c
@@ -523,7 +523,9 @@ int SCConfLogReopen(LogFileCtx *log_ctx)
         return -1;
     }
 
-    fclose(log_ctx->fp);
+    if (log_ctx->fp != NULL) {
+        fclose(log_ctx->fp);
+    }
 
     /* Reopen the file. Append is forced in case the file was not
      * moved as part of a rotation process. */
