Twas brillig at 13:13:23 31.03.2011 UTC+01 when [email protected]
did gyre and gimble:

 >> +static const char *
 >> +xau_getenv(const char *name)
 >> +{
 >> +    size_t  len        = 64;
 >> +    char   *buffer = malloc (len);
 >> +    int            rc = 0;
 >> +
 >> +    while (buffer
 >> +        &&  (rc = getenv_r (name, buffer, len)) == -1
 >> +        &&  errno == ERANGE) {
 >> +        len *= 2;
 >> +        free (buffer);
 >> +        buffer = malloc (len);
 >> +    }
 >> +    return rc == 0 ? buffer : NULL;
 >> +}
 MM> There's a (very unlikely) memory leak here.
 MM> (getenv_r() == -1 and errno != ERANGE)

Actually quite likely:

[ENOENT] The variable name was not found in the environment.

-- 
  http://fossarchy.blogspot.com/

Attachment: pgpTC7AxRpDSr.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to