src: introduce upx::atomic_exchange; cleanups
This commit is contained in:
+3
-3
@@ -512,7 +512,7 @@ void PeFile32::processRelocs() // pass1
|
||||
infoWarning("skipping unsupported relocation type %d (%d)", ic, counts[ic]);
|
||||
|
||||
LE32 *fix[4];
|
||||
upx::ArrayDeleter<LE32 **const> fix_deleter{fix, 0}; // don't leak memory
|
||||
auto fix_deleter = upx::ArrayDeleter(fix, 0); // don't leak memory
|
||||
for (unsigned ic = 0; ic <= IMAGE_REL_BASED_HIGHLOW; ic++) {
|
||||
fix[ic] = New(LE32, counts[ic]);
|
||||
fix_deleter.count += 1;
|
||||
@@ -614,7 +614,7 @@ void PeFile64::processRelocs() // pass1
|
||||
infoWarning("skipping unsupported relocation type %d (%d)", ic, counts[ic]);
|
||||
|
||||
LE32 *fix[16];
|
||||
upx::ArrayDeleter<LE32 **const> fix_deleter{fix, 0}; // don't leak memory
|
||||
auto fix_deleter = upx::ArrayDeleter(fix, 0); // don't leak memory
|
||||
for (unsigned ic = 0; ic < 16; ic++) {
|
||||
fix[ic] = New(LE32, counts[ic]);
|
||||
fix_deleter.count += 1;
|
||||
@@ -1926,7 +1926,7 @@ void PeFile::processResources(Resource *res) {
|
||||
SPAN_S_VAR(byte, ores, oresources + res->dirsize());
|
||||
|
||||
char *keep_icons = nullptr; // icon ids in the first icon group
|
||||
upx::ArrayDeleter<char **const> keep_icons_deleter{&keep_icons, 1}; // don't leak memory
|
||||
const auto keep_icons_deleter = upx::ArrayDeleter(&keep_icons, 1); // don't leak memory
|
||||
unsigned iconsin1stdir = 0;
|
||||
if (opt->win32_pe.compress_icons == 2)
|
||||
while (res->next()) // there is no rewind() in Resource
|
||||
|
||||
Reference in New Issue
Block a user