[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
maybe a flaw , in src/expand_path.c
From: |
敖 伟成 |
Subject: |
maybe a flaw , in src/expand_path.c |
Date: |
Fri, 30 Sep 2005 03:51:22 +0800 |
here "return NULL", i think it will cause weakly memory leaks.
code snippet follows:
(in function: expand_path)
################################
#ifdef GETPWNAM_MISSING
if (line != 0)
error (0, 0,
"%s:%d:tilde expansion not supported on this system",
file, line);
else
error (0, 0, "%s:tilde expansion not supported on this system",
file);
return NULL;
#else
struct passwd *ps;
ps = getpwnam (buf + d);
if (ps == 0)
{
if (line != 0)
error (0, 0, "%s:%d: no such user %s",
file, line, buf + d);
else
error (0, 0, "%s: no such user %s", file, buf + d);
return NULL;
}
e = ps->pw_dir;
#endif
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
- maybe a flaw , in src/expand_path.c,
敖 伟成 <=