summaryrefslogtreecommitdiff
path: root/server/dhcpv6.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/dhcpv6.c')
-rw-r--r--server/dhcpv6.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/server/dhcpv6.c b/server/dhcpv6.c
index cde4f617..0ea05325 100644
--- a/server/dhcpv6.c
+++ b/server/dhcpv6.c
@@ -632,13 +632,9 @@ valid_client_msg(struct packet *packet, struct data_string *client_id) {
ret_val = 1;
exit:
- if (data.len > 0) {
- data_string_forget(&data, MDL);
- }
+ data_string_forget(&data, MDL);
if (!ret_val) {
- if (client_id->len > 0) {
- data_string_forget(client_id, MDL);
- }
+ data_string_forget(client_id, MDL);
}
return ret_val;
}
@@ -723,12 +719,8 @@ valid_client_resp(struct packet *packet,
exit:
if (!ret_val) {
- if (server_id->len > 0) {
- data_string_forget(server_id, MDL);
- }
- if (client_id->len > 0) {
- data_string_forget(client_id, MDL);
- }
+ data_string_forget(server_id, MDL);
+ data_string_forget(client_id, MDL);
}
return ret_val;
}
@@ -840,9 +832,7 @@ valid_client_info_req(struct packet *packet, struct data_string *server_id) {
exit:
if (!ret_val) {
- if (server_id->len > 0) {
- data_string_forget(server_id, MDL);
- }
+ data_string_forget(server_id, MDL);
}
return ret_val;
}