Bug path

test_2
‘test_2’: events 1-6
34 void *ptr = malloc (1024);
^~~~~~~~~~~~~
|
(1) allocated here
35 if (x)
~
|
(2) following ‘false’ branch (when ‘x == 0’)...
36 free (ptr);
37 if (y)
~
|
(3) ...to here
(4) following ‘false’ branch (when ‘y == 0’)...
38 free (ptr); /* { dg-warning "double-'free' of 'ptr'" } */
39} /* { dg-warning "leak of 'ptr'" } */
~
|
(5) ...to here
(6) ‘ptr’ leaks here; was allocated at (1)