Home | History | Annotate | Download | only in Analysis

Lines Matching full:malloc

7 void *malloc(size_t);
11 void __attribute((ownership_returns(malloc))) *my_malloc(size_t);
14 void __attribute((ownership_takes(malloc, 1))) my_free(void *);
20 //--------------- test malloc family
22 int *p = (int *)malloc(sizeof(int));
23 delete p; // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not 'delete'}}
27 int *p = (int *)malloc(8);
48 int *p = (int *)malloc(sizeof(int));
49 operator delete(p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete}}
53 int *p = (int *)malloc(sizeof(int));
54 delete[] p; // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not 'delete[]'}}
58 int *p = (int *)malloc(sizeof(int));
59 operator delete[](p); // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not operator delete[]}}
120 // Check for intersection with unix.Malloc bounded with
140 int *p = (int *)malloc(sizeof(int));
146 int *p = (int *)malloc(sizeof(int));
152 int *p = (int *)malloc(sizeof(int));
162 // malloc()/free() are subjects of unix.Malloc and unix.MallocWithAnnotations
167 int *p1 = (int *)malloc(sizeof(int));
170 int *p2 = (int *)malloc(sizeof(int));
174 int *p3 = (int *)malloc(sizeof(int)); // no-warning
199 // expected-warning@-2 {{Memory allocated by malloc() should be deallocated by free(), not 'delete'}}
219 SimpleSmartPointer<int> a((int *)malloc(4));