mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01:00
gutils: Tell AddressSanitizer not to track previous XDG directories
We reset these in some unit tests, and must deliberately leak them to avoid having to break API. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
023793071b
commit
41ed1c6d5d
@ -1601,6 +1601,7 @@ set_str_if_different (gchar **global_str,
|
|||||||
|
|
||||||
/* We have to leak the old value, as user code could be retaining pointers
|
/* We have to leak the old value, as user code could be retaining pointers
|
||||||
* to it. */
|
* to it. */
|
||||||
|
g_ignore_leak (*global_str);
|
||||||
*global_str = g_strdup (new_value);
|
*global_str = g_strdup (new_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1619,6 +1620,7 @@ set_strv_if_different (gchar ***global_strv,
|
|||||||
|
|
||||||
/* We have to leak the old value, as user code could be retaining pointers
|
/* We have to leak the old value, as user code could be retaining pointers
|
||||||
* to it. */
|
* to it. */
|
||||||
|
g_ignore_strv_leak (*global_strv);
|
||||||
*global_strv = g_strdupv ((gchar **) new_value);
|
*global_strv = g_strdupv ((gchar **) new_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user