summaryrefslogtreecommitdiff
path: root/bin/sqfs2tar/write_tree.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-07-04 20:01:59 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-07-08 19:17:35 +0200
commit3946cf086183f8dd4d5d115f52ba1b87560b7ce4 (patch)
tree2659b940b757d1bd177d00562bf8e41a333ef12e /bin/sqfs2tar/write_tree.c
parent8c0aa2504199036eaaa09673ea93dcdcd79606ef (diff)
Move sqfs_tree_node_get_path to libsquashfs
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/sqfs2tar/write_tree.c')
-rw-r--r--bin/sqfs2tar/write_tree.c16
1 files changed, 8 insertions, 8 deletions
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;