[wiki] [sites] Fix memory leak in clickurl patch || Jishnu Sen

From: <git_AT_suckless.org>
Date: Mon, 08 Apr 2024 07:55:24 +0200

commit 6afcf9a0cbc0c63f8a1be4839663803063c101a6
Author: Jishnu Sen <jishnu1_AT_gmail.com>
Date: Sun Apr 7 22:55:20 2024 -0700

    Fix memory leak in clickurl patch

diff --git a/st.suckless.org/patches/clickurl/st-clickurl-0.8.5.diff b/st.suckless.org/patches/clickurl/st-clickurl-0.8.5.diff
index f5861946..169f178c 100644
--- a/st.suckless.org/patches/clickurl/st-clickurl-0.8.5.diff
+++ b/st.suckless.org/patches/clickurl/st-clickurl-0.8.5.diff
_AT_@ -1,14 +1,14 @@
-From c47ac6d407ccf5f36f59ff9281b33f96efbd6de9 Mon Sep 17 00:00:00 2001
+From d5b492049f48dc411b0dd7dc01a403304c20438d Mon Sep 17 00:00:00 2001
 From: Jishnu Sen <jishnu1_AT_gmail.com>
-Date: Sun, 7 Apr 2024 21:45:32 -0700
+Date: Sun, 7 Apr 2024 22:54:46 -0700
 Subject: [PATCH] Highlight URLs with control and follow with click
 
 ---
  config.def.h | 11 +++++++
- st.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ st.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++
  st.h | 9 ++++++
  x.c | 24 +++++++++++++-
- 4 files changed, 131 insertions(+), 1 deletion(-)
+ 4 files changed, 132 insertions(+), 1 deletion(-)
 
 diff --git a/config.def.h b/config.def.h
 index 91ab8ca..4961830 100644
_AT_@ -30,10 +30,10 @@ index 91ab8ca..4961830 100644
 + "0123456789-._~:/?#_AT_!$&'*+,;=%";
 +char* urlprefixes[] = {"http://", "https://", NULL};
 diff --git a/st.c b/st.c
-index 51049ba..244a91a 100644
+index 51049ba..8f2156c 100644
 --- a/st.c
 +++ b/st.c
-_AT_@ -643,6 +643,94 @@ getsel(void)
+_AT_@ -643,6 +643,95 @@ getsel(void)
          return str;
  }
  
_AT_@ -110,6 +110,7 @@ index 51049ba..244a91a 100644
 + }
 + }
 + if (url_start == -1) {
++ free(linestr);
 + return;
 + }
 +
Received on Mon Apr 08 2024 - 07:55:24 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 08 2024 - 08:00:53 CEST