]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Plug a leak.
authorRoy Marples <roy@marples.name>
Wed, 30 Jul 2008 11:11:08 +0000 (11:11 +0000)
committerRoy Marples <roy@marples.name>
Wed, 30 Jul 2008 11:11:08 +0000 (11:11 +0000)
client.c

index 024ac3b630a30e341ee8a2db51581745d4b13139..d611198286c557b6de6741fd3ead6f6d5e97fe37 100644 (file)
--- a/client.c
+++ b/client.c
@@ -710,13 +710,12 @@ send_message(struct if_state *state, int type, const struct options *options)
                        logger(LOG_ERR, "send_packet: %s", strerror(errno));
        } else {
                len = make_udp_packet(&udp, (uint8_t *)dhcp, len, from, to);
-               free(dhcp);
                r = send_raw_packet(state->interface, ETHERTYPE_IP, udp, len);
                free(udp);
                if (r == -1)
                        logger(LOG_ERR, "send_raw_packet: %s", strerror(errno));
        }
-
+       free(dhcp);
        /* Failed to send the packet? Return to the init state */
        if (r == -1) {
                state->state = STATE_INIT;