Commit 4e776d91 authored by Matthias Clasen's avatar Matthias Clasen

Merge branch 'no-free-check' into 'master'

Do not check for NULL when calling free()

See merge request !547
parents 8aff74e2 84d013ed
Pipeline #46722 failed with stages
in 8 minutes and 25 seconds
......@@ -170,8 +170,7 @@ g_realloc (gpointer mem,
G_STRLOC, n_bytes);
}
if (mem)
free (mem);
free (mem);
TRACE (GLIB_MEM_REALLOC((void*) NULL, (void*)mem, 0, 0));
......@@ -190,8 +189,7 @@ g_realloc (gpointer mem,
void
g_free (gpointer mem)
{
if (G_LIKELY (mem))
free (mem);
free (mem);
TRACE(GLIB_MEM_FREE((void*) mem));
}
......@@ -304,8 +302,7 @@ g_try_realloc (gpointer mem,
else
{
newmem = NULL;
if (mem)
free (mem);
free (mem);
}
TRACE (GLIB_MEM_REALLOC((void*) newmem, (void*)mem, (unsigned int) n_bytes, 1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment