[libxslt] Check for null pointer before calling freelocale
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Check for null pointer before calling freelocale
- Date: Tue, 5 Jan 2021 14:06:10 +0000 (UTC)
commit 7fd30eba2f0f96be90a0741e051099d55970bded
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Sat Dec 19 16:34:47 2020 +0100
Check for null pointer before calling freelocale
libxslt/xsltlocale.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/libxslt/xsltlocale.c b/libxslt/xsltlocale.c
index c69735cd..39980f8d 100644
--- a/libxslt/xsltlocale.c
+++ b/libxslt/xsltlocale.c
@@ -346,7 +346,8 @@ xsltDefaultRegion(const xmlChar *localeName) {
void
xsltFreeLocale(xsltLocale locale) {
#ifdef XSLT_LOCALE_POSIX
- freelocale(locale);
+ if (locale != NULL)
+ freelocale(locale);
#endif
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]