From: Vincent Bernat Date: Mon, 16 May 2016 06:55:34 +0000 (+0200) Subject: log: don't fallback to stderr for out-of-memory situation X-Git-Tag: 0.9.3~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5aae2522cc518da5200f6401f10038ccafd770b3;p=thirdparty%2Flldpd.git log: don't fallback to stderr for out-of-memory situation We don't know if "ap" is still valid. Just don't do anything. --- diff --git a/src/log.c b/src/log.c index 1de756c7..8c85d5a1 100644 --- a/src/log.c +++ b/src/log.c @@ -143,7 +143,12 @@ vlog(int pri, const char *token, const char *fmt, va_list ap) free(result); return; } - /* Otherwise, fallback to output on stderr. */ + /* Otherwise, abort. We don't know if "ap" is still OK. We could + * have made a copy, but this is too much overhead for a + * situation that shouldn't happen. */ + return; + } + } /* Log to standard error in all cases */