blob: 9049ffd229631fe6a1920fad8993f724fcb1d730 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
|