aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-04-02 18:27:12 +0200
committerMartin Willi <martin@revosec.ch>2013-05-06 15:15:24 +0200
commit50fbd32472fe4676e17915e9e56710b02c5c32c3 (patch)
tree6a93731ea47b978b3f2cbe4172c0eb96e82b0611 /src
parent3117824f55544719fe358aa21f37c22ea82bbb0a (diff)
downloadstrongswan-50fbd32472fe4676e17915e9e56710b02c5c32c3.tar.bz2
strongswan-50fbd32472fe4676e17915e9e56710b02c5c32c3.tar.xz
leak-detective: remove unused malloc call counters
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/utils/leak_detective.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c
index 169d2c87f..8ba7be8e9 100644
--- a/src/libstrongswan/utils/leak_detective.c
+++ b/src/libstrongswan/utils/leak_detective.c
@@ -71,10 +71,6 @@ struct private_leak_detective_t {
*/
#define MEMORY_ALLOC_PATTERN 0xEE
-static u_int count_malloc = 0;
-static u_int count_free = 0;
-static u_int count_realloc = 0;
-
typedef struct memory_header_t memory_header_t;
typedef struct memory_tail_t memory_tail_t;
@@ -546,7 +542,6 @@ void* malloc(size_t bytes)
return real_malloc(bytes);
}
- count_malloc++;
hdr = real_malloc(sizeof(memory_header_t) + bytes + sizeof(memory_tail_t));
tail = ((void*)hdr) + bytes + sizeof(memory_header_t);
/* set to something which causes crashes */
@@ -612,7 +607,6 @@ void free(void *ptr)
hdr = ptr - sizeof(memory_header_t);
tail = ptr + hdr->bytes;
- count_free++;
before = enable_thread(FALSE);
if (hdr->magic != MEMORY_HEADER_MAGIC ||
tail->magic != MEMORY_TAIL_MAGIC)
@@ -688,7 +682,6 @@ void* realloc(void *old, size_t bytes)
hdr = old - sizeof(memory_header_t);
tail = old + hdr->bytes;
- count_realloc++;
if (hdr->magic != MEMORY_HEADER_MAGIC ||
tail->magic != MEMORY_TAIL_MAGIC)
{