diff --git a/criu/log.c b/criu/log.c index 64ce8c525..6dd853074 100644 --- a/criu/log.c +++ b/criu/log.c @@ -114,8 +114,12 @@ static void log_note_err(char *msg) char *log_first_err(void) { - BUG_ON(!first_err); - return first_err->s[0] == '\0' ? NULL : first_err->s; + if (!first_err) + return NULL; + if (first_err->s[0] == '\0') + return NULL; + + return first_err->s; } int log_init(const char *output)