Browse Source

replace assertion with conditional in utilSafeFree()

main
cinnaboot 5 years ago
parent
commit
2f2a496d48
  1. 6
      src/util.h

6
src/util.h

@ -148,8 +148,10 @@ utilAllocateCStr(const char* str, u32 max_len)
void
utilSafeFree(void* p)
{
assert(p != nullptr);
free(p);
if (p)
free(p);
else
printf("%s(), free called on nullptr\n", __FUNCTION__);
}
#endif

Loading…
Cancel
Save