1 /* Reduced from haproxy-2.7.1's cfgparse.c. */
3 typedef __SIZE_TYPE__
size_t;
6 calloc(size_t __nmemb
, size_t __size
)
7 __attribute__((__nothrow__
, __leaf__
))
8 __attribute__((__malloc__
)) __attribute__((__alloc_size__(1, 2)));
23 extern struct list postparsers
;
26 cfg_register_postparser(char* name
, int (*func
)())
28 struct cfg_postparser
* cp
;
30 cp
= (struct cfg_postparser
*) calloc(1, sizeof(*cp
));
39 (&cp
->list
)->p
= (&postparsers
)->p
;
40 (&cp
->list
)->p
->n
= (&postparsers
)->p
= (&cp
->list
);
41 (&cp
->list
)->n
= (&postparsers
);
45 return 1; /* { dg-bogus "leak of 'cp'" } */