Skip to content

Commit

Permalink
Remove //TODO comment from 76/09
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstanb committed Nov 8, 2023
1 parent 9f7224e commit c056b32
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/regression/76-memleak/09-unreachable-with-local-var.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ int main(int argc, char const *argv[]) {
g = malloc(sizeof(int));
// Reference to g's heap contents is lost here
g = NULL;
// We get a false positive for p's memory being unreachable
// It's still leaked, but due to free() being commented out
// TODO: Should we only improve the error reporting for unreachable memory in this case?

// According to `valid-memtrack`, the memory of p is unreachable and we don't have a false positive
int *p = malloc(sizeof(int));
//free(p);

return 0; //WARN
}

0 comments on commit c056b32

Please sign in to comment.