blob: Handle failure to alloc xattr on parse
Or rather, at least assert that the allocation failed. This is not a recoverable error in general. Change-Id: I9bc325066e829fc311ce84ce83536e9933ac5473 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
88213615b6
commit
abc73f6995
@ -231,6 +231,7 @@ _spdk_blob_parse_page(const struct spdk_blob_md_page *page, struct spdk_blob *bl
|
||||
assert(xattr != NULL);
|
||||
|
||||
xattr->name = malloc(desc_xattr->name_length + 1);
|
||||
assert(xattr->name);
|
||||
strncpy(xattr->name, desc_xattr->name, desc_xattr->name_length);
|
||||
xattr->name[desc_xattr->name_length] = '\0';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user