reference.c: correct rollback in error paths
authorEric Biggers <ebiggers3@gmail.com>
Sun, 14 Dec 2014 18:05:52 +0000 (12:05 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 14 Dec 2014 18:05:52 +0000 (12:05 -0600)
commitf448d994fe935614b586bd6797e20d5596a3e1a3
treeb128a9fc73bb7c4c5ad8c26345d31edc898487cb
parentfa36a299ac2c41ee8ae588829fe7eeba08904629
reference.c: correct rollback in error paths

previous implementation had several problems:

- use of 'out_refcnt' was wrong (it wasn't guaranteed to be 0 beforehand)
- globs were rolled back individually, not together

This commit correctly implements full rollback for both
wimlib_reference_resources() and wimlib_reference_resource_files().
src/reference.c