test/mem: disable ASan when accessing unallocated memory
[dpdk.git] / lib / eal / common / eal_common_log.c
index 1be35f5..d57dca9 100644 (file)
 #include <fnmatch.h>
 #include <sys/queue.h>
 
-#include <rte_eal.h>
 #include <rte_log.h>
 #include <rte_os_shim.h>
 #include <rte_per_lcore.h>
 
 #include "eal_log.h"
+#include "eal_private.h"
 
 struct rte_log_dynamic_type {
        const char *name;
@@ -535,3 +535,15 @@ eal_log_set_default(FILE *default_log)
                "Debug dataplane logs available - lower performance\n");
 #endif
 }
+
+/*
+ * Called by eal_cleanup
+ */
+void
+rte_eal_log_cleanup(void)
+{
+       if (default_log_stream) {
+               fclose(default_log_stream);
+               default_log_stream = NULL;
+       }
+}