From: Marcin Siodelski Date: Thu, 5 Oct 2017 09:17:28 +0000 (+0200) Subject: [5364] Avoid null pointer dereference when there is no subnet. X-Git-Tag: trac5297_base~6^2~2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7be1582119b7858d29593e0521a4802704af7911;p=thirdparty%2Fkea.git [5364] Avoid null pointer dereference when there is no subnet. --- diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index d016b0f032..4d6fbe0ef2 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -1237,7 +1237,7 @@ Dhcpv6Srv::assignLeases(const Pkt6Ptr& question, Pkt6Ptr& answer, // Subnet may be modified by the allocation engine, if the initial subnet // belongs to a shared network. - if (subnet->getID() != ctx.subnet_->getID()) { + if (ctx.subnet_ && subnet && (subnet->getID() != ctx.subnet_->getID())) { SharedNetwork6Ptr network; subnet->getSharedNetwork(network); if (network) {