Skip to content

Commit

Permalink
Merge pull request #263 from eriksjolund/writer-set-errno
Browse files Browse the repository at this point in the history
writer: Set errno
  • Loading branch information
cgwalters authored Mar 20, 2024
2 parents d5ffbeb + 9b417be commit 2cb505b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcomposefs/lcfs-writer.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ int lcfs_version_from_fd(int fd)
}
if (lcfs_u32_from_file(header->magic) != LCFS_EROFS_MAGIC ||
lcfs_u32_from_file(header->version) != LCFS_EROFS_VERSION) {
errno = EINVAL;
munmap(header, header_size);
errno = EINVAL;
return -1;
}

Expand Down Expand Up @@ -1155,6 +1155,7 @@ struct lcfs_node_s *lcfs_node_clone(struct lcfs_node_s *node)
if (key == NULL || value == NULL) {
free(key);
free(value);
errno = ENOMEM;
return NULL;
}
new->xattrs[i].key = key;
Expand Down

0 comments on commit 2cb505b

Please sign in to comment.