multipath-tools/multipath-tools-use-MALLOC-FREE-for-checker

63 lines
1.5 KiB
Plaintext

From 0f7c86b8ba073570acc7fa31c9f52adc2cf4ac8f Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 8 Jan 2009 09:12:36 +0100
Subject: [PATCH] Use MALLOC/FREE for checker and prio allocation
We should be using the proper defines for malloc/free to
ease tracking of memory leaks.
Signed-off-by: Konrad Rzeszutek <konrad@virtualiron.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
libmultipath/checkers.c | 4 ++--
libmultipath/prio.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
index 231b408..45ef531 100644
--- a/libmultipath/checkers.c
+++ b/libmultipath/checkers.c
@@ -38,7 +38,7 @@ struct checker * alloc_checker (void)
{
struct checker *c;
- c = zalloc(sizeof(struct checker));
+ c = MALLOC(sizeof(struct checker));
if (c)
INIT_LIST_HEAD(&c->node);
return c;
@@ -54,7 +54,7 @@ void free_checker (struct checker * c)
c->name, dlerror());
}
}
- free(c);
+ FREE(c);
}
void cleanup_checkers (void)
diff --git a/libmultipath/prio.c b/libmultipath/prio.c
index 1b9f51b..5e01f54 100644
--- a/libmultipath/prio.c
+++ b/libmultipath/prio.c
@@ -22,7 +22,7 @@ struct prio * alloc_prio (void)
{
struct prio *p;
- p = zalloc(sizeof(struct prio));
+ p = MALLOC(sizeof(struct prio));
if (p)
INIT_LIST_HEAD(&p->node);
return p;
@@ -38,7 +38,7 @@ void free_prio (struct prio * p)
p->name, dlerror());
}
}
- free(p);
+ FREE(p);
}
void cleanup_prio(void)
--
1.6.0.2