]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: log: make sess_build_logline() not dereference a NULL stream for txn
authorWilly Tarreau <w@1wt.eu>
Wed, 5 Sep 2018 13:10:35 +0000 (15:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Sep 2018 18:01:23 +0000 (20:01 +0200)
If the stream is NULL, the txn is NULL as well. This condition is already
handled everywhere else.

src/log.c

index 2613940e7ec797c2acd62d41bb91bfeb3fa02ef8..eaa8cf3ab8b37e0d19a5cf9bc89976d3ccd450e5 100644 (file)
--- 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;