fix small error handling bug.

(Logical change 1.242)
edge.strict_endians
cantab.net!aia21 2003-12-02 17:16:21 +00:00
parent 9789e0f753
commit 09ec84d205
1 changed files with 3 additions and 1 deletions

View File

@ -729,7 +729,7 @@ runlist_element *ntfs_mapping_pairs_decompress(const ntfs_volume *vol,
runlist_element *rl; /* The output runlist. */
u8 *buf; /* Current position in mapping pairs array. */
u8 *attr_end; /* End of attribute. */
int rlsize; /* Size of runlist buffer. */
int err, rlsize; /* Size of runlist buffer. */
u16 rlpos; /* Current runlist position in units of
runlist_elements. */
u8 b; /* Current byte offset in buf. */
@ -921,8 +921,10 @@ mpa_err:
old_rl = ntfs_runlists_merge(old_rl, rl);
if (old_rl)
return old_rl;
err = errno;
free(rl);
Dputs("Failed to merge runlists.");
errno = err;
return NULL;
io_error:
Dputs("Corrupt attribute.");