aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/pr94399.c
blob: e897c04a007ef9935ac5717ac1d14e6cbfe9812a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdlib.h>

#define _cleanup_(f) __attribute__((cleanup(f)))

static inline void freep(void **p) {
  free(*p);
}

void test(void) {
  _cleanup_(freep) void *ptr;

  ptr = malloc(3);
} /* { dg-bogus "leak" } */