error check & memset to zero
authoraland <aland>
Mon, 7 Jul 2003 19:04:05 +0000 (19:04 +0000)
committeraland <aland>
Mon, 7 Jul 2003 19:04:05 +0000 (19:04 +0000)
src/modules/rlm_attr_filter/rlm_attr_filter.c

index 015d731..5e96365 100644 (file)
@@ -152,6 +152,10 @@ static int attr_filter_instantiate(CONF_SECTION *conf, void **instance)
        int rcode;
 
         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);