mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-29 13:28:10 +00:00
Add missing globfree(3) in command_matches_glob() when matching a directory.
This commit is contained in:
parent
387169ac67
commit
ecbe95589a
@ -464,8 +464,10 @@ command_matches_glob(const char *sudoers_cmnd, const char *sudoers_args,
|
|||||||
/* If it ends in '/' it is a directory spec. */
|
/* If it ends in '/' it is a directory spec. */
|
||||||
dlen = strlen(cp);
|
dlen = strlen(cp);
|
||||||
if (cp[dlen - 1] == '/') {
|
if (cp[dlen - 1] == '/') {
|
||||||
if (command_matches_dir(cp, dlen, runchroot, digests))
|
if (command_matches_dir(cp, dlen, runchroot, digests)) {
|
||||||
|
globfree(&gl);
|
||||||
debug_return_bool(true);
|
debug_return_bool(true);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user