Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2404,8 +2404,10 @@ int _dmalloc_chunk_free(const char *file, const unsigned int line,

#if ALLOW_FREE_NULL == 0
dmalloc_errno = DMALLOC_ERROR_IS_NULL;
#endif
return FREE_ERROR;
#else
return FREE_NOERROR;
#endif
}

update_p = skip_update;
Expand Down
5 changes: 5 additions & 0 deletions dmalloc_t.c
Original file line number Diff line number Diff line change
Expand Up @@ -1897,8 +1897,13 @@ static int check_special(void)
#endif

/* now test the dmalloc_free function */
#if ALLOW_FREE_NULL
if (dmalloc_free(__FILE__, __LINE__, NULL,
DMALLOC_FUNC_FREE) != FREE_NOERROR) {
#else
if (dmalloc_free(__FILE__, __LINE__, NULL,
DMALLOC_FUNC_FREE) != FREE_ERROR) {
#endif
if (! silent_b) {
loc_printf(" ERROR: free of NULL should have failed.\n");
}
Expand Down