]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Set option buffer length to 0 when freeing
authorRoy Marples <roy@marples.name>
Fri, 23 Dec 2022 14:24:59 +0000 (14:24 +0000)
committerRoy Marples <roy@marples.name>
Fri, 23 Dec 2022 14:26:21 +0000 (14:26 +0000)
As we test length of buffer when reallocating.
Fixes #156.

src/dhcp.c

index ce3b87c8bf5d15d755d724a75f59a64ab46a44f6..c7154634146b4e9a26ece0e01b789a715bd44ede 100644 (file)
@@ -3833,6 +3833,7 @@ dhcp_free(struct interface *ifp)
 
                free(ctx->opt_buffer);
                ctx->opt_buffer = NULL;
+               ctx->opt_buffer_len = 0;
        }
 }