Fix for f4fc389
.
Need to check for NULL pointer before using. Reported by: Peter Holm Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
2ddf8cdbe0
commit
2567b60f62
@ -583,7 +583,8 @@ linkup(ino_t orphan, ino_t parentdir, char *name)
|
||||
inoinfo(lfdir)->ino_linkcnt++;
|
||||
pwarn("DIR I=%lu CONNECTED. ", (u_long)orphan);
|
||||
inp = getinoinfo(parentdir);
|
||||
if (parentdir != (ino_t)-1 && (inp->i_flags & INFO_NEW) == 0) {
|
||||
if (parentdir != (ino_t)-1 && inp != NULL &&
|
||||
(inp->i_flags & INFO_NEW) == 0) {
|
||||
printf("PARENT WAS I=%lu\n", (u_long)parentdir);
|
||||
/*
|
||||
* If the parent directory did not have to
|
||||
@ -840,8 +841,7 @@ allocdir(ino_t parent, ino_t request, int mode)
|
||||
irelse(&ip);
|
||||
return (0);
|
||||
}
|
||||
if ((inp = getinoinfo(ino)) == NULL)
|
||||
inp = cacheino(dp, ino);
|
||||
inp = cacheino(dp, ino);
|
||||
inp->i_parent = parent;
|
||||
inp->i_dotdot = parent;
|
||||
inoinfo(ino)->ino_state = inoinfo(parent)->ino_state;
|
||||
|
Loading…
Reference in New Issue
Block a user