../../src/gcc/testsuite/gcc.dg/analyzer/malloc-paths-5.c: In function ‘test’: ../../src/gcc/testsuite/gcc.dg/analyzer/malloc-paths-5.c:28:3: warning: double-‘free’ of ‘p’ [CWE-415] [-Wanalyzer-double-free] 28 | free (p); /* { dg-line second_free_of_p } */ | ^~~~~~~~ ‘test’: events 1-8 | | 12 | p = (int *)malloc (sizeof (int)); /* { dg-line malloc_of_p } */ | | ^~~~~~~~~~~~~~~~~~~~~ | | | | | (1) allocated here | 13 | if (!p) /* { dg-line test_of_p } */ | | ~ | | | | | (2) assuming ‘p’ is non-NULL | | (3) following ‘false’ branch (when ‘p’ is non-NULL)... |...... | 19 | q = (int *)malloc (sizeof (int)); /* { dg-line malloc_of_q } */ | | ~~~~~~~~~~~~~~~~~~~~~ | | | | | (4) ...to here | 20 | if (!q) /* { dg-line test_of_q } */ | | ~ | | | | | (5) following ‘true’ branch (when ‘q’ is NULL)... | 21 | { | 22 | free (p); /* { dg-line first_free_of_p } */ | | ~~~~~~~~ | | | | | (6) ...to here | | (7) first ‘free’ here |...... | 28 | free (p); /* { dg-line second_free_of_p } */ | | ~~~~~~~~ | | | | | (8) second ‘free’ here; first ‘free’ was at (7) |