dissect: add assert to guide static analysis

CID#1533112
This commit is contained in:
Luca Boccassi
2024-01-04 12:47:18 +01:00
parent c658ad79f0
commit 43108bf87a

View File

@@ -1709,6 +1709,8 @@ static int action_detach(const char *path) {
struct stat st;
int r;
assert(path);
fd = open(path, O_PATH|O_CLOEXEC);
if (fd < 0)
return log_error_errno(errno, "Failed to open '%s': %m", path);