CID 1744 : memory leak on error
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38131 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -471,8 +471,10 @@ RemoteMessage::ReadGradient(BGradient** _gradient)
|
||||
|
||||
int32 stopCount;
|
||||
status_t result = Read(stopCount);
|
||||
if (result != B_OK)
|
||||
if (result != B_OK) {
|
||||
delete gradient;
|
||||
return result;
|
||||
}
|
||||
|
||||
for (int32 i = 0; i < stopCount; i++) {
|
||||
rgb_color color;
|
||||
|
||||
Reference in New Issue
Block a user