diff options
author | Yi-Yo Chiang <yochiang@google.com> | 2021-02-14 21:07:33 +0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2021-02-14 10:20:18 -0600 |
commit | 0678d2c1e6561960704817722f41d33ee851730f (patch) | |
tree | 97743e974ceb8b93ae069049882a30f2b6f272aa /toys/posix | |
parent | 5c73305f0e4bb5e16aae798e177ec9213f853eec (diff) | |
download | toybox-0678d2c1e6561960704817722f41d33ee851730f.tar.gz |
cpio: Guard free() with CFG_TOYBOX_FREE
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/cpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/cpio.c b/toys/posix/cpio.c index 31c777c9..04700ddb 100644 --- a/toys/posix/cpio.c +++ b/toys/posix/cpio.c @@ -278,7 +278,7 @@ void cpio_main(void) free(link); xclose(fd); } - free(name); + if (CFG_TOYBOX_FREE) free(name); memset(toybuf, 0, sizeof(toybuf)); xwrite(afd, toybuf, |