{
struct pat_ref *ref;
- ref = malloc(sizeof(*ref));
+ ref = calloc(1, sizeof(*ref));
if (!ref)
return NULL;
return NULL;
}
}
- else
- ref->display = NULL;
ref->reference = strdup(reference);
if (!ref->reference) {
{
struct pat_ref *ref;
- ref = malloc(sizeof(*ref));
+ ref = calloc(1, sizeof(*ref));
if (!ref)
return NULL;
return NULL;
}
}
- else
- ref->display = NULL;
ref->reference = NULL;
ref->flags = flags;
{
struct pat_ref_elt *elt;
- elt = malloc(sizeof(*elt));
+ elt = calloc(1, sizeof(*elt));
if (!elt)
goto fail;
if (!elt->sample)
goto fail;
}
- else
- elt->sample = NULL;
LIST_INIT(&elt->back_refs);
LIST_ADDQ(&ref->head, &elt->list);
*reuse = 0;
/* Memory and initialization of the chain element. */
- list = malloc(sizeof(*list));
+ list = calloc(1, sizeof(*list));
if (!list) {
memprintf(err, "out of memory");
return NULL;
/* If no similar expr was found, we create new expr. */
if (!expr) {
/* Get a lot of memory for the expr struct. */
- expr = malloc(sizeof(*expr));
+ expr = calloc(1, sizeof(*expr));
if (!expr) {
free(list);
memprintf(err, "out of memory");