summaryrefslogtreecommitdiff
path: root/accel-pptpd/iprange.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2010-09-20 01:09:07 +0400
committerDmitry Kozlov <xeb@mail.ru>2010-09-20 01:09:34 +0400
commitb96fbc3f966b012720d2b74b1dfd2a0ab95086cf (patch)
tree606750874faf65029f756dc0b401ee40cc4da89f /accel-pptpd/iprange.c
parentd860a4beaf5f99d5045d03b931b4829426a2f7b0 (diff)
downloadaccel-ppp-b96fbc3f966b012720d2b74b1dfd2a0ab95086cf.tar.gz
accel-ppp-b96fbc3f966b012720d2b74b1dfd2a0ab95086cf.zip
fixed many bugs and memory leaks
Diffstat (limited to 'accel-pptpd/iprange.c')
-rw-r--r--accel-pptpd/iprange.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/accel-pptpd/iprange.c b/accel-pptpd/iprange.c
index 317b66dc..0b1997e9 100644
--- a/accel-pptpd/iprange.c
+++ b/accel-pptpd/iprange.c
@@ -8,6 +8,8 @@
#include "iprange.h"
+#include "memdebug.h"
+
struct iprange_t
{
struct list_head entry;
@@ -39,7 +41,7 @@ static struct iprange_t *parse1(const char *str)
if (m == 0 || m > 32)
return NULL;
- r = malloc(sizeof(*r));
+ r = _malloc(sizeof(*r));
r->prefix = (f4 << 24) | (f3 << 16) | (f2 << 8) | f1;
r->mask = 0;
@@ -69,7 +71,7 @@ static struct iprange_t *parse2(const char *str)
if (m < f4 || m > 255)
return NULL;
- r = malloc(sizeof(*r));
+ r = _malloc(sizeof(*r));
r->prefix = (f4 << 24) | (f3 << 16) | (f2 << 8) | f1;
r->end = (m << 24) | (f3 << 16) | (f2 << 8) | f1;
r->mask = 0;