]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix a memory leak in archive_matching.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 23 Jan 2012 09:12:54 +0000 (04:12 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 23 Jan 2012 09:12:54 +0000 (04:12 -0500)
SVN-Revision: 4194

libarchive/archive_matching.c

index 5893ef9e63e2a2bc045b0dd29b6004fa8eb3f0c0..65a671c9a6bd165096146483e8f3ef6682fb28e8 100644 (file)
@@ -1143,6 +1143,7 @@ get_filetime_wcs(struct archive_matching *a, const wchar_t *path,
 
        archive_string_init(&as);
        if (archive_string_append_from_wcs(&as, path, wcslen(path)) < 0) {
+               archive_string_free(&as);
                if (errno == ENOMEM)
                        return (error_nomem(a));
                archive_set_error(&(a->archive), -1,