summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/rdsquashfs/describe.c4
-rw-r--r--bin/rdsquashfs/fill_files.c4
-rw-r--r--bin/rdsquashfs/restore_fstree.c6
-rw-r--r--bin/sqfs2tar/write_tree.c16
-rw-r--r--bin/sqfsdiff/node_compare.c6
-rw-r--r--bin/sqfsdiff/util.c2
6 files changed, 19 insertions, 19 deletions
diff --git a/bin/rdsquashfs/describe.c b/bin/rdsquashfs/describe.c
index e0e22bc..1e723bc 100644
--- a/bin/rdsquashfs/describe.c
+++ b/bin/rdsquashfs/describe.c
@@ -17,7 +17,7 @@ static int print_name(const sqfs_tree_node_t *n, bool dont_escape)
if (canonicalize_name(name) != 0) {
fprintf(stderr, "Error sanitizing file path '%s'\n", name);
- free(name);
+ sqfs_free(name);
return -1;
}
@@ -47,7 +47,7 @@ static int print_name(const sqfs_tree_node_t *n, bool dont_escape)
fputc('"', stdout);
}
- free(name);
+ sqfs_free(name);
return 0;
}
diff --git a/bin/rdsquashfs/fill_files.c b/bin/rdsquashfs/fill_files.c
index 1afe6b8..8459c1e 100644
--- a/bin/rdsquashfs/fill_files.c
+++ b/bin/rdsquashfs/fill_files.c
@@ -89,7 +89,7 @@ static int add_file(const sqfs_tree_node_t *node)
if (canonicalize_name(path)) {
fprintf(stderr, "Invalid file path '%s'\n", path);
- free(path);
+ sqfs_free(path);
return -1;
}
@@ -104,7 +104,7 @@ static void clear_file_list(void)
size_t i;
for (i = 0; i < num_files; ++i)
- free(files[i].path);
+ sqfs_free(files[i].path);
free(files);
files = NULL;
diff --git a/bin/rdsquashfs/restore_fstree.c b/bin/rdsquashfs/restore_fstree.c
index 57582c2..cf5bc2a 100644
--- a/bin/rdsquashfs/restore_fstree.c
+++ b/bin/rdsquashfs/restore_fstree.c
@@ -141,7 +141,7 @@ static int create_node_dfs(const sqfs_tree_node_t *n, int flags)
printf("creating %s\n", name);
ret = create_node(n, name, flags);
- free(name);
+ sqfs_free(name);
if (ret)
return -1;
@@ -276,10 +276,10 @@ static int set_attribs(sqfs_xattr_reader_t *xattr,
}
}
- free(path);
+ sqfs_free(path);
return 0;
fail:
- free(path);
+ sqfs_free(path);
return -1;
}
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;
diff --git a/bin/sqfsdiff/node_compare.c b/bin/sqfsdiff/node_compare.c
index d8f0878..6e8c2fa 100644
--- a/bin/sqfsdiff/node_compare.c
+++ b/bin/sqfsdiff/node_compare.c
@@ -90,7 +90,7 @@ int node_compare(sqfsdiff_t *sd, sqfs_tree_node_t *a, sqfs_tree_node_t *b)
status = 1;
} else {
fprintf(stdout, "%s has a different type\n", path);
- free(path);
+ sqfs_free(path);
return 1;
}
}
@@ -168,7 +168,7 @@ int node_compare(sqfsdiff_t *sd, sqfs_tree_node_t *a, sqfs_tree_node_t *b)
if (ret > 0)
status = 1;
- free(path);
+ sqfs_free(path);
path = NULL;
ait = a->children;
@@ -200,6 +200,6 @@ int node_compare(sqfsdiff_t *sd, sqfs_tree_node_t *a, sqfs_tree_node_t *b)
break;
}
- free(path);
+ sqfs_free(path);
return status;
}
diff --git a/bin/sqfsdiff/util.c b/bin/sqfsdiff/util.c
index 5e9161a..ab6fa59 100644
--- a/bin/sqfsdiff/util.c
+++ b/bin/sqfsdiff/util.c
@@ -17,7 +17,7 @@ char *node_path(const sqfs_tree_node_t *n)
if (canonicalize_name(path)) {
fprintf(stderr, "failed to canonicalization '%s'\n", path);
- free(path);
+ sqfs_free(path);
return NULL;
}