Skip to content

Commit

Permalink
with a memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
levb committed Jul 10, 2023
1 parent 15729ee commit adb4ce8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -16860,6 +16860,8 @@ test_Version(void)
{
const char *str = NULL;

void *sanitize_leak_pointer = calloc(1, 1);
testCond(sanitize_leak_pointer != NULL);
test("Compatibility: ");
testCond(nats_CheckCompatibility() == true);

Expand All @@ -16878,6 +16880,11 @@ test_VersionMatchesTag(void)
natsStatus s = NATS_OK;
const char *tag;

char *sanitize_write_after_free = calloc(1, 1);
free(sanitize_write_after_free);
*sanitize_write_after_free = 1;
testCond(*sanitize_write_after_free == 1);

tag = getenv("TRAVIS_TAG");
if ((tag == NULL) || (tag[0] == '\0'))
{
Expand Down

0 comments on commit adb4ce8

Please sign in to comment.