Fix memleak in ntfs_attr_update_mapping_pairs

(Logical change 1.678)
edge.strict_endians
void!yura 2005-02-17 18:01:56 +00:00
parent b6b7655c55
commit 03a03359a1
1 changed files with 7 additions and 3 deletions

View File

@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2004 Anton Altaparmakov
* Copyright (c) 2002 Richard Russon
* Copyright (c) 2004 Yura Pakhuchiy
* Copyright (c) 2004-2005 Yura Pakhuchiy
*
* This program/include file is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published
@ -4293,9 +4293,12 @@ retry:
goto put_err_out;
}
Dprintf("%s(): Deallocate done.\n", __FUNCTION__);
ntfs_attr_put_search_ctx(ctx);
return 0;
}
ntfs_attr_put_search_ctx(ctx);
ctx = NULL;
/* Allocate new MFT records for the rest of mapping pairs. */
while (1) {
/* Calculate size of rest mapping pairs. */
@ -4367,7 +4370,8 @@ retry:
}
return 0;
put_err_out:
ntfs_attr_put_search_ctx(ctx);
if (ctx)
ntfs_attr_put_search_ctx(ctx);
errno = err;
return -1;
}