Skip to content

Commit 5773654

Browse files
authored
Apply suggestions from code review
1 parent 482dd20 commit 5773654

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/test/Analysis/malloc-checker-arg-uaf.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ void use(void *ptr);
1111
void test_direct_param_uaf() {
1212
int *p = (int *)malloc(sizeof(int));
1313
free(p);
14-
use(p); // expected-warning{{Use of memory after it is freed}}
14+
use(p); // expected-warning{{Use of memory after it is released}}
1515
}
1616

1717
void test_struct_field_uaf() {
1818
struct Obj *o = (struct Obj *)malloc(sizeof(struct Obj));
1919
free(o);
20-
use(&o->field); // expected-warning{{Use of memory after it is freed}}
20+
use(&o->field); // expected-warning{{Use of memory after it is released}}
2121
}
2222

2323
void test_no_warning_const_int() {
@@ -33,12 +33,12 @@ void test_nested_alloc() {
3333
struct Obj *o = (struct Obj *)malloc(sizeof(struct Obj));
3434
use(o); // no-warning
3535
free(o);
36-
use(o); // expected-warning{{Use of memory after it is freed}}
36+
use(o); // expected-warning{{Use of memory after it is released}}
3737
}
3838

3939
void test_nested_field() {
4040
struct Obj *o = (struct Obj *)malloc(sizeof(struct Obj));
4141
int *f = &o->field;
4242
free(o);
43-
use(f); // expected-warning{{Use of memory after it is freed}}
43+
use(f); // expected-warning{{Use of memory after it is released}}
4444
}

0 commit comments

Comments
 (0)