]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Add a call to dereference the packet structure if the deocding fails
authorShawn Routhier <sar@isc.org>
Tue, 23 Feb 2016 20:16:19 +0000 (12:16 -0800)
committerShawn Routhier <sar@isc.org>
Tue, 23 Feb 2016 20:16:19 +0000 (12:16 -0800)
Squashed commit of the following:

commit 7d61e40149676f989667cac90d9c3b6f5b63ac6b
Author: Shawn Routhier <sar@isc.org>
Date:   Tue Feb 23 11:31:27 2016 -0800

    [rt41774] Add a call to dereference the packet structure if the deocding fails

RELNOTES
common/options.c

index da7e147428619c1c8cd1591fe4e26a8a1710140e..445deba9ed24013dca72aedf19b354b12c980288 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -244,6 +244,10 @@ by Eric Young (eay@cryptsoft.com).
   [ISC-Bugs #37954]
   [ISC-Bugs #40752]
 
+- Add a dereference call when handling an error condition while
+  decoding a packet.
+  [ISC-Bugs #41774]
+
                        Changes since 4.3.3b1
 
 - None
index 50271f22007facbe1b02df9604a953c592081387..1db73ac5a4fac81bd5279eddae9f93581914c2d5 100644 (file)
@@ -3877,6 +3877,7 @@ void do_packet (interface, packet, len, from_port, from, hfrom)
        /* Allocate packet->options now so it is non-null for all packets */
        decoded_packet->options_valid = 0;
        if (!option_state_allocate (&decoded_packet->options, MDL)) {
+               packet_dereference(&decoded_packet, MDL);
                return;
        }