mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
xlocale.c: check for allocation failure
PR: 261679
(cherry picked from commit b68522308d)
This commit is contained in:
parent
236a826c14
commit
3e4e8d5cbf
1 changed files with 3 additions and 0 deletions
|
|
@ -198,6 +198,9 @@ alloc_locale(void)
|
|||
{
|
||||
locale_t new = calloc(sizeof(struct _xlocale), 1);
|
||||
|
||||
if (new == NULL)
|
||||
return (NULL);
|
||||
|
||||
new->header.destructor = destruct_locale;
|
||||
new->monetary_locale_changed = 1;
|
||||
new->numeric_locale_changed = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue