[PATCH v8] locale: memory leak in newlocale [BZ #25770]

Dmitry Kovalenko d.kovalenko@postgrespro.ru
Wed Jun 4 18:52:11 GMT 2025


> You could use TEST_COMPARE and TEST_VERIFY instead, then you won't even
> have to write a message. 8-)

Sorry for an unformatted code and a mistake in usage of errno in my 
previous email (

---------

{ /* We can use an any valid path here. */ int const r = setenv 
("LOCPATH", ".", 1); if (r != 0) FAIL_EXIT1 ("setenv failed: (errno %d) 
%m", errno); } { locale_t const l = newlocale (1 << LC_CTYPE, "POSIX", 
NULL); if (l == NULL) FAIL_EXIT1 ("newlocale failed: (errno %d) %m", 
errno); freelocale (l); }

---------

Thanks&Regards,

Dmitry Kovalenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250604/2dc3ef2e/attachment.htm>


More information about the Libc-alpha mailing list