]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/linuxapp/eal/eal_debug.c
eal: add function to release internal resources
[dpdk.git] / lib / librte_eal / linuxapp / eal / eal_debug.c
index b0ae2b7f2df14d6876f6bef2813d14ee5e5199e4..5d92500bf59a4d3b6133a0bc961e36107955ecd0 100644 (file)
@@ -14,6 +14,7 @@
 #include <rte_log.h>
 #include <rte_debug.h>
 #include <rte_common.h>
+#include <rte_eal.h>
 
 #define BACKTRACE_SIZE 256
 
@@ -79,6 +80,9 @@ rte_exit(int exit_code, const char *format, ...)
        va_end(ap);
 
 #ifndef RTE_EAL_ALWAYS_PANIC_ON_ERROR
+       if (rte_eal_cleanup() != 0)
+               RTE_LOG(CRIT, EAL,
+                       "EAL could not release all resources\n");
        exit(exit_code);
 #else
        rte_dump_stack();