nemuTUI / nemu

Ncurses UI for QEMU
BSD 2-Clause "Simplified" License
317 stars 22 forks source link

nm_mon: use atexit instead of on_exit #89

Closed dm9pZCAq closed 3 years ago

dm9pZCAq commented 3 years ago

related issue: #87

dm9pZCAq commented 3 years ago

Please fix debug message bot being printed if atexit context is not set yet.

should be something like this?

if (!clean_ptr) {
    nm_debug("error 'clean_ptr' not set\n");
    return;
}

or just

-       if (!clean_ptr) return;
-
     nm_debug("mon daemon exited\n");

+    if (!clean_ptr)
+        return;
+
grafin commented 3 years ago
nm_debug("error 'clean_ptr' not set\n");

if (!clean_ptr)
    return;
dm9pZCAq commented 3 years ago

what's wrong with codeql?

ok, it's just java :+1:

grafin commented 3 years ago

I'll just merge this PR, and fix minor issues myself. CodeQL just ran out of memory, happens to best of us:).