summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGard Spreemann <gspr@nonempty.org>2023-04-10 15:52:45 +0200
committerGard Spreemann <gspr@nonempty.org>2023-04-10 15:52:45 +0200
commit7cf2eb0a0db012c815697cf1b2c10753b427f502 (patch)
tree195bb38df7f600dcbd19e03270c49efdfac7eaa8
parentfa4c5a57782c0d06cc0cf32fc496ba1e102bc926 (diff)
Add upstream patch to fix memory leakdebian/0.8.4-3
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/0001-Fix-a-memory-leak.patch29
-rw-r--r--debian/patches/series1
3 files changed, 36 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index df93a4a..a902da0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+waypipe (0.8.4-3) unstable; urgency=medium
+
+ * Add upstream patch to fix memory leak. (Closes: #1034163)
+
+ -- Gard Spreemann <gspr@nonempty.org> Mon, 10 Apr 2023 15:51:36 +0200
+
waypipe (0.8.4-2) unstable; urgency=medium
* Increase timeout limit for build-time tests. (Closes: #1011322)
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;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cd3504b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Fix-a-memory-leak.patch