Time preference: Fix a memory leak
Accidentally introduced with an earlier commit.
This commit is contained in:
parent
93f68d97bf
commit
0106325bc4
@ -175,8 +175,10 @@ Settings::SettingsChanged()
|
||||
return true;
|
||||
fOldMessage.Flatten(oldBytes, oldSize);
|
||||
char* newBytes = new (std::nothrow) char[newSize];
|
||||
if (newBytes == NULL)
|
||||
if (newBytes == NULL) {
|
||||
delete[] oldBytes;
|
||||
return true;
|
||||
}
|
||||
fMessage.Flatten(newBytes, newSize);
|
||||
|
||||
int result = memcmp(oldBytes, newBytes, oldSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user