Plug memory leak in error path when sudoers cannot be opened.
This commit is contained in:
@@ -1015,6 +1015,7 @@ new_sudoers(const char *path, bool doedit)
|
|||||||
bad:
|
bad:
|
||||||
if (entry->fd != -1)
|
if (entry->fd != -1)
|
||||||
close(entry->fd);
|
close(entry->fd);
|
||||||
|
free(entry->path);
|
||||||
free(entry);
|
free(entry);
|
||||||
debug_return_ptr(NULL);
|
debug_return_ptr(NULL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user