summaryrefslogtreecommitdiff
path: root/common/comapi.c
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2015-11-05 07:07:42 -0500
committerThomas Markwalder <tmark@isc.org>2015-11-05 07:07:42 -0500
commitce29e695745f3a660f0a0cd9e43b4b1c41bb8276 (patch)
tree0eb7242af024280a483cb502ccb43fa1e8ce2fd2 /common/comapi.c
parente1634c24796da4d88846dbe0391df830cfa554ab (diff)
downloadisc-dhcp-ce29e695745f3a660f0a0cd9e43b4b1c41bb8276.tar.gz
[master] Fixed memory leask in omapi dereferencing
Merges in rt33990.
Diffstat (limited to 'common/comapi.c')
-rw-r--r--common/comapi.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/common/comapi.c b/common/comapi.c
index ee1c7ec5..46282158 100644
--- a/common/comapi.c
+++ b/common/comapi.c
@@ -3,7 +3,7 @@
OMAPI object interfaces for the DHCP server. */
/*
- * Copyright (c) 2012,2014 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2012,2014-2015 Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
@@ -653,16 +653,11 @@ isc_result_t dhcp_subnet_get_value (omapi_object_t *h, omapi_object_t *id,
isc_result_t dhcp_subnet_destroy (omapi_object_t *h, const char *file, int line)
{
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
struct subnet *subnet;
-#endif
if (h -> type != dhcp_type_subnet)
return DHCP_R_INVALIDARG;
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
subnet = (struct subnet *)h;
if (subnet -> next_subnet)
subnet_dereference (&subnet -> next_subnet, file, line);
@@ -675,7 +670,6 @@ isc_result_t dhcp_subnet_destroy (omapi_object_t *h, const char *file, int line)
interface_dereference (&subnet -> interface, file, line);
if (subnet -> group)
group_dereference (&subnet -> group, file, line);
-#endif
return ISC_R_SUCCESS;
}
@@ -807,16 +801,11 @@ isc_result_t dhcp_shared_network_destroy (omapi_object_t *h,
{
/* In this function h should be a (struct shared_network *) */
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
struct shared_network *shared_network;
-#endif
if (h -> type != dhcp_type_shared_network)
return DHCP_R_INVALIDARG;
-#if defined (DEBUG_MEMORY_LEAKAGE) || \
- defined (DEBUG_MEMORY_LEAKAGE_ON_EXIT)
shared_network = (struct shared_network *)h;
if (shared_network -> next)
shared_network_dereference (&shared_network -> next,
@@ -841,7 +830,6 @@ isc_result_t dhcp_shared_network_destroy (omapi_object_t *h,
&shared_network -> failover_peer,
file, line);
#endif
-#endif /* DEBUG_MEMORY_LEAKAGE */
return ISC_R_SUCCESS;
}