From 56a91dddc62f790e3dd390fa90f22b0f53eaecd3 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 5 Sep 2018 15:10:35 +0200 Subject: [PATCH] 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. --- src/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index 2613940e7..eaa8cf3ab 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;