diff options
Diffstat (limited to 'debian/patches/0001-Fix-a-memory-leak.patch')
-rw-r--r-- | debian/patches/0001-Fix-a-memory-leak.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/debian/patches/0001-Fix-a-memory-leak.patch b/debian/patches/0001-Fix-a-memory-leak.patch new file mode 100644 index 0000000..9049ffd --- /dev/null +++ b/debian/patches/0001-Fix-a-memory-leak.patch @@ -0,0 +1,29 @@ +From: Gard Spreemann <gspr@nonempty.org> +Date: Mon, 10 Apr 2023 12:21:18 +0200 +Subject: Fix a memory leak + +This cherry-picks upstream commit +9070c4c527c906cb186588ca410d92d2f7f3c7ba. The original commit message +follows. + +This was introduced by a0f6bfa191f55b99e4ff68dd0063aa0c0e12dcbd +incorrectly checking when to increase the value of +cxs->last_confirmed_msgno. As a result, one of the two Waypipe +processes would leak all the messages sent to the other process. +--- + src/mainloop.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/mainloop.c b/src/mainloop.c +index 181319c..38a084d 100644 +--- a/src/mainloop.c ++++ b/src/mainloop.c +@@ -280,7 +280,7 @@ static int interpret_chanmsg(struct chan_msg_state *cmsg, + } else if (type == WMSG_ACK_NBLOCKS) { + struct wmsg_ack *ackm = (struct wmsg_ack *)packet; + if (msgno_gt(ackm->messages_received, +- cxs->last_received_msgno)) { ++ cxs->last_confirmed_msgno)) { + cxs->last_confirmed_msgno = ackm->messages_received; + } + return 0; |