While looking at used of LCRSODIR, I saw an unchecked strdup.

That could lead to a NULL dereference.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1878 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
Steven Dake 2009-03-19 23:50:35 +00:00
parent 031c02f589
commit d038f4c148

View File

@ -176,8 +176,7 @@ static void defaults_path_build (void)
char *res;
res = getcwd (cwd, sizeof (cwd));
if (res != NULL) {
path_list[0] = strdup (cwd);
if (res != NULL && (path_list[0] = strdup (cwd)) != NULL) {
path_list_entries++;
}