summaryrefslogtreecommitdiff
path: root/src/lib/log
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2019-03-29 18:38:27 +0200
committerNick Mathewson <nickm@torproject.org>2019-03-29 14:26:13 -0400
commit537ad0bca3479c10fc7d1093aff534be11800dcb (patch)
tree5d8eaff9cd16c6e9446de0f21ba4386c4c637f1e /src/lib/log
parent9c132a5f9e87a2cd0f59bd8d21226ba2256f7bce (diff)
downloadtor-537ad0bca3479c10fc7d1093aff534be11800dcb.tar.gz
tor-537ad0bca3479c10fc7d1093aff534be11800dcb.zip
Check for NULL in tor_assertf_nonfatal()
Diffstat (limited to 'src/lib/log')
-rw-r--r--src/lib/log/util_bug.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c
index e5d5a2958c..b9dc296fc6 100644
--- a/src/lib/log/util_bug.c
+++ b/src/lib/log/util_bug.c
@@ -145,7 +145,8 @@ tor_bug_occurred_(const char *fname, unsigned int line,
log_warn(LD_BUG, "%s:%u: %s: Non-fatal assertion %s failed.%s",
fname, line, func, expr, once_str);
tor_asprintf(&buf, "Non-fatal assertion %s failed in %s at %s:%u%s%s",
- expr, func, fname, line, fmt ? " : " : "", extra);
+ expr, func, fname, line, fmt ? " : " : "",
+ extra ? extra : "");
tor_free(extra);
}
log_backtrace(LOG_WARN, LD_BUG, buf);