Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Jan 15, 2024
1 parent 5a4baab commit 8de7677
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/cfg/bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@ void arrayIndexOutOfBounds(void)

void reallocarray_memleak(void) {
char *a = (char *)malloc(10);
// cppcheck-suppress memleakOnRealloc
// cppcheck-suppress [memleakOnRealloc, unreadVariable]
a = reallocarray(a, 100, 2);
// cppcheck-suppress memleak
}

void reallocarray_notused(void)
{
// cppcheck-suppress leakReturnValNotUsed
// cppcheck-suppress [leakReturnValNotUsed, ignoredReturnValue]
reallocarray(NULL, 10, 10);
}

0 comments on commit 8de7677

Please sign in to comment.