diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2010-09-20 01:09:07 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2010-09-20 01:09:34 +0400 |
commit | b96fbc3f966b012720d2b74b1dfd2a0ab95086cf (patch) | |
tree | 606750874faf65029f756dc0b401ee40cc4da89f /accel-pptpd/iprange.c | |
parent | d860a4beaf5f99d5045d03b931b4829426a2f7b0 (diff) | |
download | accel-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.c | 6 |
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; |