0
0
mirror of https://github.com/libarchive/libarchive.git synced 2026-01-18 17:11:25 +01:00

archive_write_shar_header: free shar->last_dir before replacement

This commit is contained in:
AZero13
2025-12-26 15:02:24 -05:00
parent b2d68e2f1a
commit 9a089dc44a

View File

@@ -240,6 +240,7 @@ archive_write_shar_header(struct archive_write *a, struct archive_entry *entry)
shar_quote(&shar->work, p, 1);
archive_strcat(&shar->work,
" > /dev/null 2>&1\n");
free(shar->last_dir);
shar->last_dir = p;
}
} else {