diff options
author | Miles Bader <miles@gnu.org> | 1996-07-28 02:07:49 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-28 02:07:49 +0000 |
commit | f36a186b7784e30c0f83018b7c3f8f77dc9062b4 (patch) | |
tree | 7585e2b6a3c490f0ea6dca44ac417e98b092734f /libdiskfs | |
parent | da5a13c67521f1aace2fe110111014780f9290fb (diff) |
(diskfs_lookup): Don't nput *NP if we didn't find a file.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/lookup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdiskfs/lookup.c b/libdiskfs/lookup.c index f38efed2..40ce8937 100644 --- a/libdiskfs/lookup.c +++ b/libdiskfs/lookup.c @@ -129,7 +129,7 @@ diskfs_lookup (struct node *dp, char *name, enum lookup_type type, error_t err2 = diskfs_checkdirmod (dp, (err || !np) ? 0 : *np, cred); if (err2) { - if (np) + if (np && !err) diskfs_nput (*np); return err2; } |