image: call image_align after checking hash
This commit is contained in:
1 parent
d10814e808
commit
b581c7f25d
1 file changed
+2
-1
+2
-1
@@ -237,7 +237,6 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui
|
||||
image->cur = 0;
|
||||
|
||||
image_append(image, type, device, hwrevs, version, layout);
|
||||
image_align(image);
|
||||
|
||||
if ( image->hash != hash ) {
|
||||
fprintf(stderr, "Error: Image hash mishmash (expected %#04x)\n", image->hash);
|
||||
@@ -245,6 +244,8 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui
|
||||
return NULL;
|
||||
}
|
||||
|
||||
image_align(image);
|
||||
|
||||
return image;
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user