Samuel Thibault wrote:
zhengda, le Sun 10 Aug 2008 19:42:18 +0200, a écrit :
Samuel Thibault wrote:
if (domain > max_domain || servers[domain] == MACH_PORT_NULL)
  {
    char *name = NULL;
    char *np = NULL;

    if (__asprintf (&name, "SOCK_SERV_%d", domain) > 0)
      {
        np = getenv (name);
        free (name);
gdb shows the error happens here when 'name' is freed.

Oh, I know.  Ierk.
You need to use __free.  I wonder why the Hurd still has its own
malloc/free.
so I used 'free' of the Hurd version. It wasted me so long time.
Now it seems to work. Thank you.

Zheng Da



Reply via email to