]> gitweb.michael.orlitzky.com - apply-default-acl.git/blobdiff - src/libadacl.c
src/libadacl.c: fix a memory leak found by clang-tidy.
[apply-default-acl.git] / src / libadacl.c
index cdd07fcfee7c7400256e9ea619cc6abea99a195d..f20d4a393c26f4e22a8e1cb77947214539b6fb5e 100644 (file)
@@ -1025,7 +1025,8 @@ int apply_default_acl(const char* path, bool recursive) {
   basename_path_copy = strdup(path);
   if (basename_path_copy == NULL) {
     perror("apply_default_acl (strdup)");
-    return ACL_ERROR;
+    result = ACL_ERROR;
+    goto cleanup;
   }
   fd = openat(parent_fd, basename(basename_path_copy), O_NOFOLLOW);
   if (fd == OPEN_ERROR) {