projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e61461
)
die if failed allocating memory.
author
aland
<aland>
Mon, 7 Jul 2003 19:02:48 +0000
(19:02 +0000)
committer
aland
<aland>
Mon, 7 Jul 2003 19:02:48 +0000
(19:02 +0000)
memset() data to 0.
src/modules/rlm_detail/rlm_detail.c
patch
|
blob
|
history
diff --git
a/src/modules/rlm_detail/rlm_detail.c
b/src/modules/rlm_detail/rlm_detail.c
index
84549b8
..
6bf304b
100644
(file)
--- a/
src/modules/rlm_detail/rlm_detail.c
+++ b/
src/modules/rlm_detail/rlm_detail.c
@@
-72,7
+72,11
@@
static int detail_instantiate(CONF_SECTION *conf, void **instance)
{
struct detail_instance *inst;
- inst = rad_malloc(sizeof *inst);
+ inst = rad_malloc(sizeof(*inst));
+ if (!inst) {
+ return -1;
+ }
+ memset(inst, 0, sizeof(*inst));
if (cf_section_parse(conf, inst, module_config) < 0) {
free(inst);