1
0
mirror of https://git.tukaani.org/xz.git synced 2026-10-31 11:24:56 +00:00

xz: Free the filename read from the file specified with --files/--files0

Like the previous commit, this cleans up leak detection slightly.
Otherwise it doesn't matter because xz is going to exit soon anyway.
This commit is contained in:
Lasse Collin 2026-07-21 13:50:13 +03:00
parent 7bd6d63b0c
commit 4b9b827117
No known key found for this signature in database
GPG Key ID: 38EE757D69184620

View File

@ -89,7 +89,7 @@ read_name(const args_info *args)
message_error(_("%s: Error reading filenames: %s"), message_error(_("%s: Error reading filenames: %s"),
tuklib_mask_nonprint(args->files_name), tuklib_mask_nonprint(args->files_name),
strerror(errno)); strerror(errno));
return NULL; break;
} }
if (feof(args->files_file)) { if (feof(args->files_file)) {
@ -99,7 +99,7 @@ read_name(const args_info *args)
tuklib_mask_nonprint( tuklib_mask_nonprint(
args->files_name)); args->files_name));
return NULL; break;
} }
if (c == args->files_delim) { if (c == args->files_delim) {
@ -125,7 +125,7 @@ read_name(const args_info *args)
"of '--files'?"), "of '--files'?"),
tuklib_mask_nonprint( tuklib_mask_nonprint(
args->files_name)); args->files_name));
return NULL; break;
} }
name[pos++] = c; name[pos++] = c;
@ -149,6 +149,8 @@ read_name(const args_info *args)
} }
} }
free(name);
name = NULL;
return NULL; return NULL;
} }