.. so we can free at exit
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
#include <stdlib.h>
#include <list/list.h>
#include <stdlib.h>
#include <list/list.h>
+#include <talloc/talloc.h>
STATIC_LIST(tester);
struct item *item;
struct item *tmp;
STATIC_LIST(tester);
struct item *item;
struct item *tmp;
+ ctx = talloc_new(NULL);
+
for (i = 0; i < 5; i++) {
for (i = 0; i < 5; i++) {
- struct item *item = malloc(sizeof(struct item));
+ struct item *item = talloc(ctx, struct item);
return EXIT_FAILURE;
}
fprintf(stderr, "-- done --\n");
return EXIT_FAILURE;
}
fprintf(stderr, "-- done --\n");