xbps_dictionary_from_archive_entry: fixed internalizing uncompressed dictionaries.
(cherry picked from commit 2debc5c5ee6db1a197fe3afebaa9463934707b10)
This commit is contained in:
parent
83688cf8ec
commit
9e5c7de33b
@ -141,10 +141,10 @@ xbps_dictionary_from_archive_entry(struct archive *ar,
|
||||
}
|
||||
|
||||
uncomp_buf = _xbps_uncompress_plist_data(buf, buflen);
|
||||
free(buf);
|
||||
if (uncomp_buf == NULL) {
|
||||
if (errno && errno != EAGAIN) {
|
||||
/* Error while decompressing */
|
||||
free(buf);
|
||||
return NULL;
|
||||
} else if (errno == EAGAIN) {
|
||||
/* Not a compressed data, try again */
|
||||
@ -156,5 +156,6 @@ xbps_dictionary_from_archive_entry(struct archive *ar,
|
||||
d = prop_dictionary_internalize(uncomp_buf);
|
||||
free(uncomp_buf);
|
||||
}
|
||||
free(buf);
|
||||
return d;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user