Skip to content

Commit

Permalink
Merge pull request #273 from Gottox/fix/xattr-malloc-error
Browse files Browse the repository at this point in the history
easy/xattr: Return proper error code when malloc fails
  • Loading branch information
Gottox authored Jul 27, 2024
2 parents 898bf37 + ac4fd65 commit 8eff9ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libsqsh/src/easy/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ sqsh_easy_xattr_get(
}

xattr_value = sqsh_xattr_iterator_value_dup(&iterator);
if (xattr_value == NULL) {
rv = -SQSH_ERROR_MALLOC_FAILED;
goto out;
}

out:
sqsh__xattr_iterator_cleanup(&iterator);
Expand Down

0 comments on commit 8eff9ad

Please sign in to comment.