diff options
author | Ron Yorston <rmy@pobox.com> | 2021-01-25 15:38:14 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2021-01-25 15:38:14 +0000 |
commit | 4c3677b8875323e5f844d1fd47feaf0dbd58c8fa (patch) | |
tree | 9a93d478ad0fde3903b6418b3078156df8320425 | |
parent | eb0c2bbbaf0722103124a589e3dfe952c2664cbb (diff) | |
download | busybox-w32-4c3677b8875323e5f844d1fd47feaf0dbd58c8fa.tar.gz busybox-w32-4c3677b8875323e5f844d1fd47feaf0dbd58c8fa.tar.bz2 busybox-w32-4c3677b8875323e5f844d1fd47feaf0dbd58c8fa.zip |
ar: only free temporary filename if required
-rw-r--r-- | archival/ar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/ar.c b/archival/ar.c index eb734a685..1879ec79f 100644 --- a/archival/ar.c +++ b/archival/ar.c | |||
@@ -200,9 +200,10 @@ static int write_ar_archive(archive_handle_t *handle) | |||
200 | } | 200 | } |
201 | 201 | ||
202 | #if ENABLE_PLATFORM_MINGW32 | 202 | #if ENABLE_PLATFORM_MINGW32 |
203 | if ( temp_fn != NULL ) { | 203 | if (temp_fn != NULL) { |
204 | xrename(temp_fn, handle->ar__name); | 204 | xrename(temp_fn, handle->ar__name); |
205 | free(temp_fn); | 205 | if (ENABLE_FEATURE_CLEAN_UP) |
206 | free(temp_fn); | ||
206 | } | 207 | } |
207 | #endif | 208 | #endif |
208 | 209 | ||