From 6fa12d02dd9201653da7b368d035008670d965b3 Mon Sep 17 00:00:00 2001 From: KinderRiven <1339764596@qq.com> Date: Sun, 12 Jun 2022 13:17:14 +0800 Subject: [PATCH] fix --- utils/self-extr-exec/compressor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/self-extr-exec/compressor.cpp b/utils/self-extr-exec/compressor.cpp index 7b600a2ca0e..49baf19ce1d 100644 --- a/utils/self-extr-exec/compressor.cpp +++ b/utils/self-extr-exec/compressor.cpp @@ -297,7 +297,7 @@ int copy_decompressor(const char *self, int output_fd) return 1; } - char * buf = new char[1ul<<19]; + char * buf = (char *)malloc(1ul<<19); ssize_t n = 0; do { @@ -327,7 +327,7 @@ int copy_decompressor(const char *self, int output_fd) } while (true); close(input_fd); - delete []buf; + free(buf); return 0; }