mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-16 17:26:15 +01:00
Merge branch 'no-free-check' into 'master'
Do not check for NULL when calling free() See merge request GNOME/glib!547
This commit is contained in:
commit
4e776d9167
@ -170,7 +170,6 @@ g_realloc (gpointer mem,
|
|||||||
G_STRLOC, n_bytes);
|
G_STRLOC, n_bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mem)
|
|
||||||
free (mem);
|
free (mem);
|
||||||
|
|
||||||
TRACE (GLIB_MEM_REALLOC((void*) NULL, (void*)mem, 0, 0));
|
TRACE (GLIB_MEM_REALLOC((void*) NULL, (void*)mem, 0, 0));
|
||||||
@ -190,7 +189,6 @@ g_realloc (gpointer mem,
|
|||||||
void
|
void
|
||||||
g_free (gpointer mem)
|
g_free (gpointer mem)
|
||||||
{
|
{
|
||||||
if (G_LIKELY (mem))
|
|
||||||
free (mem);
|
free (mem);
|
||||||
TRACE(GLIB_MEM_FREE((void*) mem));
|
TRACE(GLIB_MEM_FREE((void*) mem));
|
||||||
}
|
}
|
||||||
@ -304,7 +302,6 @@ g_try_realloc (gpointer mem,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
newmem = NULL;
|
newmem = NULL;
|
||||||
if (mem)
|
|
||||||
free (mem);
|
free (mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user