main: safeguard delete-resource

This commit is contained in:
Thomas Schoebel-Theuer 2020-07-27 15:41:55 +02:00 committed by Thomas Schoebel-Theuer
parent 3fb3ce9c8e
commit fb6ed4aebe

View File

@ -3873,6 +3873,9 @@ int _check_logging_status(struct mars_rotate *rot, int *log_nr, long long *oldpo
goto done;
status = -EINVAL;
/* may happen after delete-resource */
if (!dent->d_path)
goto done;
CHECK_PTR(dent->d_path, done);
parent = dent->d_parent;
CHECK_PTR(parent, done);