From: Willy Tarreau Date: Wed, 5 Sep 2018 13:10:35 +0000 (+0200) Subject: MINOR: log: make sess_build_logline() not dereference a NULL stream for txn X-Git-Tag: v1.9-dev2~92 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56a91dddc62f790e3dd390fa90f22b0f53eaecd3;p=thirdparty%2Fhaproxy.git MINOR: log: make sess_build_logline() not dereference a NULL stream for txn If the stream is NULL, the txn is NULL as well. This condition is already handled everywhere else. --- diff --git a/src/log.c b/src/log.c index 2613940e7e..eaa8cf3ab8 100644 --- a/src/log.c +++ b/src/log.c @@ -1572,7 +1572,7 @@ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t { struct proxy *fe = sess->fe; struct proxy *be = s ? s->be : fe; - struct http_txn *txn = s->txn; + struct http_txn *txn = s ? s->txn : NULL; struct buffer chunk; char *uri; char *spc;