blob: 55e04f982f2cafef9246fff0197477284b3db727 [file] [log] [blame]
sewardj99a2ceb2007-11-09 12:30:36 +00001#include <stdlib.h>
2
3typedef struct
4{
5 char *spointer1;
6} structure;
7
8structure **func1(void)
9{
10
11 structure **pointer1 = 0;
12
13 pointer1 = (structure **)malloc(4 * sizeof(structure *)); /* Line 13 */
14 pointer1[1] = (structure *)malloc(sizeof(structure)); /* Line 14 */
15 pointer1[1]->spointer1 = (char *)malloc(64); /* Line 15 */
16
17 return pointer1;
18}
19
20int main(int argc, char *argv[])
21{
22 structure **pointer1 = func1();
23
24 free(pointer1); /* Leak reports Line 24 */
25
26 return 0;
27}