summaryrefslogtreecommitdiff
path: root/source/lib/vuser.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/vuser.c')
-rw-r--r--source/lib/vuser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/vuser.c b/source/lib/vuser.c
index 1131761705f..d64a82ca321 100644
--- a/source/lib/vuser.c
+++ b/source/lib/vuser.c
@@ -62,12 +62,12 @@ user_struct *get_valid_user_struct(const vuser_key *key)
}
if (!tdb_lookup_vuid(key, &usr))
{
- vuid_free_user_struct(usr);
return NULL;
}
if (usr->uid == (uid_t)-1 || usr->gid == (gid_t)-1)
{
vuid_free_user_struct(usr);
+ return NULL;
}
return usr;
}