1 |
/* This file is part of GNU RADIUS. |
/* This file is part of GNU Radius. |
2 |
Copyright (C) 2000, Sergey Poznyakoff |
Copyright (C) 2000,2001,2002,2003 Sergey Poznyakoff |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
GNU Radius is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
6 |
the Free Software Foundation; either version 2 of the License, or |
the Free Software Foundation; either version 2 of the License, or |
7 |
(at your option) any later version. |
(at your option) any later version. |
8 |
|
|
9 |
This program is distributed in the hope that it will be useful, |
GNU Radius is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU General Public License for more details. |
GNU General Public License for more details. |
13 |
|
|
14 |
You should have received a copy of the GNU General Public License |
You should have received a copy of the GNU General Public License |
15 |
along with this program; if not, write to the Free Software Foundation, |
along with GNU Radius; if not, write to the Free Software Foundation, |
16 |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
17 |
|
|
18 |
#define RADIUS_MODULE_LEAKDETECT_C |
#define RADIUS_MODULE_LEAKDETECT_C |
39 |
#endif |
#endif |
40 |
|
|
41 |
void * |
void * |
42 |
radxmalloc(size) |
radxmalloc(size_t size) |
|
size_t size; |
|
43 |
{ |
{ |
44 |
char *p; |
char *p; |
45 |
|
|
64 |
} |
} |
65 |
|
|
66 |
void * |
void * |
67 |
radxrealloc(ptr, size) |
radxrealloc(void *ptr, size_t size) |
|
void *ptr; |
|
|
size_t size; |
|
68 |
{ |
{ |
69 |
if (!ptr) |
if (!ptr) |
70 |
return radxmalloc(size); |
return radxmalloc(size); |
91 |
} |
} |
92 |
|
|
93 |
void * |
void * |
94 |
emalloc(size) |
emalloc(size_t size) |
|
size_t size; |
|
95 |
{ |
{ |
96 |
char *p; |
char *p; |
97 |
|
|
104 |
} |
} |
105 |
|
|
106 |
void * |
void * |
107 |
erealloc(ptr, size) |
erealloc(void *ptr, size_t size) |
|
void *ptr; |
|
|
size_t size; |
|
108 |
{ |
{ |
109 |
ptr = radxrealloc(ptr, size); |
ptr = radxrealloc(ptr, size); |
110 |
if (!ptr) { |
if (!ptr) { |
115 |
} |
} |
116 |
|
|
117 |
void |
void |
118 |
efree(ptr) |
efree(void *ptr) |
|
void *ptr; |
|
119 |
{ |
{ |
120 |
#ifdef LEAK_DETECTOR |
#ifdef LEAK_DETECTOR |
121 |
MHDR *mhdr; |
MHDR *mhdr; |
139 |
} |
} |
140 |
|
|
141 |
char * |
char * |
142 |
estrdup(s) |
estrdup(char *s) |
|
char *s; |
|
143 |
{ |
{ |
144 |
char *p; |
char *p; |
145 |
|
|