summaryrefslogtreecommitdiff
path: root/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utility.c b/utility.c
index 1f0e381..469275f 100644
--- a/utility.c
+++ b/utility.c
@@ -645,11 +645,14 @@ my_getid(const char *filename, char *name, uid_t id)
continue;
if (name) {
- if (0 == strcmp(rname, name))
+ if (0 == strcmp(rname, name)) {
+ fclose( file);
return( rid);
+ }
}
if ( id != -1 && id == rid ) {
strncpy(name, rname, 8);
+ fclose( file);
return( TRUE);
}
}