mirror of
https://github.com/schoebel/mars
synced 2024-12-24 23:52:46 +00:00
main: safeguard delete-resource
This commit is contained in:
parent
3fb3ce9c8e
commit
fb6ed4aebe
@ -3873,6 +3873,9 @@ int _check_logging_status(struct mars_rotate *rot, int *log_nr, long long *oldpo
|
|||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
status = -EINVAL;
|
status = -EINVAL;
|
||||||
|
/* may happen after delete-resource */
|
||||||
|
if (!dent->d_path)
|
||||||
|
goto done;
|
||||||
CHECK_PTR(dent->d_path, done);
|
CHECK_PTR(dent->d_path, done);
|
||||||
parent = dent->d_parent;
|
parent = dent->d_parent;
|
||||||
CHECK_PTR(parent, done);
|
CHECK_PTR(parent, done);
|
||||||
|
Loading…
Reference in New Issue
Block a user