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

Dmitry Kovalenko d.kovalenko@postgrespro.ru
Thu Jun 5 07:46:09 GMT 2025


Attempt #3.
 
--------- static int
do_test (void)
{
  mtrace ();
  {
    /*  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);
  }
  return 0;
}
---------
 
Thanks&Regards
Dmitry Kovalenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250605/487a4339/attachment.htm>


More information about the Libc-alpha mailing list