From 3946cf086183f8dd4d5d115f52ba1b87560b7ce4 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 4 Jul 2022 20:01:59 +0200 Subject: Move sqfs_tree_node_get_path to libsquashfs Signed-off-by: David Oberhollenzer --- bin/sqfs2tar/write_tree.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'bin/sqfs2tar') diff --git a/bin/sqfs2tar/write_tree.c b/bin/sqfs2tar/write_tree.c index 5fa08e8..d4f8366 100644 --- a/bin/sqfs2tar/write_tree.c +++ b/bin/sqfs2tar/write_tree.c @@ -119,14 +119,14 @@ static int write_tree_dfs(const sqfs_tree_node_t *n) if (lnk != NULL) { ret = write_hard_link(out_file, &sb, name, lnk->target, record_counter++); - free(name); + sqfs_free(name); return ret; } } if (!no_xattr) { if (get_xattrs(name, n->inode, &xattr)) { - free(name); + sqfs_free(name); return -1; } } @@ -140,24 +140,24 @@ static int write_tree_dfs(const sqfs_tree_node_t *n) goto out_skip; if (ret < 0) { - free(name); + sqfs_free(name); return -1; } if (S_ISREG(sb.st_mode)) { if (sqfs_data_reader_dump(name, data, n->inode, out_file, super.block_size)) { - free(name); + sqfs_free(name); return -1; } if (padd_file(out_file, sb.st_size)) { - free(name); + sqfs_free(name); return -1; } } - free(name); + sqfs_free(name); skip_hdr: for (n = n->children; n != NULL; n = n->next) { if (write_tree_dfs(n)) @@ -172,7 +172,7 @@ out_skip: fprintf(stderr, "Skipping %s\n", name); ret = 0; } - free(name); + sqfs_free(name); return ret; } @@ -198,7 +198,7 @@ out_links: while (links != NULL) { lnk = links; links = links->next; - free(lnk->target); + sqfs_free(lnk->target); free(lnk); } return status; -- cgit v1.2.3