- blob_set_is_located_in_wim_resource(blob, &rdesc);
- blob->flags = rdesc.flags;
- blob->size = rdesc.uncompressed_size;
- blob->offset_in_res = 0;
- blob->unhashed = 1;
-
- ret = sha1_blob(blob);
-
- blob_unset_is_located_in_wim_resource(blob);
- copy_hash(hash, blob->hash);
- free_blob_descriptor(blob);
- return ret;
+ ret = sha1_blob(&blob);
+ if (ret)
+ return ret;
+ copy_hash(hash, blob.hash);
+ return 0;