]> 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:24:59 +0000 (14:24 +0000)
As we test length of buffer when reallocating.
Fixes #156.

src/dhcp.c

index e24f55947070bc1cc005b2ff7400d259b3da373c..39839562645f38305ee18249db23f33723c49a96 100644 (file)
@@ -3828,6 +3828,7 @@ dhcp_free(struct interface *ifp)
 
                free(ctx->opt_buffer);
                ctx->opt_buffer = NULL;
+               ctx->opt_buffer_len = 0;
        }
 }