xar: clean xattr checksum on encoder setup failure
Finalize the remaining xattr checksum context if encoder setup fails.
This commit is contained in:
1 parent
c318e8fac6
commit
9b1746f63a
1 file changed
+4
@@ -3266,6 +3266,10 @@ save_xattrs(struct archive_write *a, struct file *file)
|
||||
*/
|
||||
r = xar_compression_init_encoder(a);
|
||||
if (r != ARCHIVE_OK) {
|
||||
struct chksumval sumval;
|
||||
|
||||
checksum_final(&(xar->a_sumwrk), &sumval);
|
||||
xar->a_sumwrk.alg = CKSUM_NONE;
|
||||
free(heap);
|
||||
return (ARCHIVE_FATAL);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user