Skip to contentSkip to conversation

tun.c: remove unused gc_arena from init_tun()

PATCH In review Lev Stipakov 3 participants 3 messages Aug 9, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tun.c: remove unused gc_arena from init_tun()

From: Lev Stipakov <[email protected]...>

---
 src/openvpn/tun.c | 2 --
 1 file changed, 2 deletions(-)
src/openvpn/tun.c +0 -2
index 54f7d72c..f3152a52 100644
@@ -745,7 +745,6 @@ init_tun(const char *dev,        /* --dev option */
          struct env_set *es,
          openvpn_net_ctx_t *ctx)
 {
-    struct gc_arena gc = gc_new();
     struct tuntap *tt;
 
     ALLOC_OBJ(tt, struct tuntap);
@@ -878,7 +877,6 @@ init_tun(const char *dev,        /* --dev option */
         do_ifconfig_setenv(tt, es);
     }
 
-    gc_free(&gc);
     return tt;
 }
 
Signature · 1 line
2.23.0.windows.1
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 3 lines · Lev Stipakov

From: Lev Stipakov <[email protected]...>

This gc thing is indeed unused and can go.

Quoted 24 lines
---
  src/openvpn/tun.c | 2 --
  1 file changed, 2 deletions(-)
src/openvpn/tun.c +0 -2
index 54f7d72c..f3152a52 100644
@@ -745,7 +745,6 @@ init_tun(const char *dev,        /* --dev option */
           struct env_set *es,
           openvpn_net_ctx_t *ctx)
  {
-    struct gc_arena gc = gc_new();
      struct tuntap *tt;
 
      ALLOC_OBJ(tt, struct tuntap);
@@ -878,7 +877,6 @@ init_tun(const char *dev,        /* --dev option */
          do_ifconfig_setenv(tt, es);
      }
 
-    gc_free(&gc);
      return tt;
  }
 
Signature · 1 line
Antonio Quartulli
#2 lore raw
In reply to Lev Stipakov

Your patch has been applied to the master branch.

Good catch. No idea when and why we lost the users of this...

commit 0585a4bf1a5ba9cf2051a7d65ac0628bf7164299

Author: Lev Stipakov
Date:   Tue Aug 9 10:22:20 2022 +0300
     tun.c: remove unused gc_arena from init_tun()

     Signed-off-by: Lev Stipakov <[email protected]...>
     Acked-by: Antonio Quartulli <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg24851.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering