Fix a memory leak in getent() that occurred when the requested entry
could not be found. PR: bin/17084
This commit is contained in:
parent
3f81737f30
commit
8187dd1c8b
@ -382,8 +382,10 @@ getent(cap, len, db_array, fd, name, depth, nfield)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!foundit)
|
||||
if (!foundit) {
|
||||
free(record);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Got the capability record, but now we have to expand all tc=name
|
||||
|
Loading…
x
Reference in New Issue
Block a user