aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Lichtenheld2023-05-15 17:54:07 +0200
committerGert Doering2023-05-16 12:09:51 +0200
commiteb9fffe64a095a881db848839aef6960e1402ca6 (patch)
tree271b1369abd491e740906be0c8dd634a75e81bf7
parent5e8a571af165c867ccb9c4c9e6334620f42013ac (diff)
downloadopenvpn-eb9fffe64a095a881db848839aef6960e1402ca6.zip
openvpn-eb9fffe64a095a881db848839aef6960e1402ca6.tar.gz
Fix two unused assignments
A fallout of my memleak investigation. These are not leaks, we just assign a value that is never read before overwritten. Not critical, but since I already stumbled over it... Change-Id: I761ea3d289f49a20e42a3d1bfccebce3c7447afe Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20230515155407.38647-1-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26662.html Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit b5cf76cbdc0d7ef2817b71f4611d99455e2d48ea)
-rw-r--r--src/openvpn/push.c1
-rw-r--r--src/openvpn/tun.c3
2 files changed, 1 insertions, 3 deletions
diff --git a/src/openvpn/push.c b/src/openvpn/push.c
index 54e53f6..8e96271 100644
--- a/src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -713,7 +713,6 @@ send_push_options(struct context *c, struct buffer *buf,
{
struct push_entry *e = push_list->head;
- e = push_list->head;
while (e)
{
if (e->enable)
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 2320e8b..df10dbd 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -4337,7 +4337,6 @@ get_unspecified_device_guid(const int device_number,
struct gc_arena *gc)
{
const struct tap_reg *tap_reg = tap_reg_src;
- struct buffer ret = clear_buf();
struct buffer actual = clear_buf();
int i;
@@ -4381,7 +4380,7 @@ get_unspecified_device_guid(const int device_number,
}
/* Save GUID for return value */
- ret = alloc_buf_gc(256, gc);
+ struct buffer ret = alloc_buf_gc(256, gc);
buf_printf(&ret, "%s", tap_reg->guid);
if (windows_driver != NULL)
{