Memory leak fix in Realloc_brush()
This commit is contained in:
parent
c8e5656579
commit
84fbe26e8a
@ -760,15 +760,15 @@ byte Realloc_brush(word new_brush_width, word new_brush_height, byte *new_brush,
|
|||||||
|
|
||||||
// Save or free the old brush pixels
|
// Save or free the old brush pixels
|
||||||
if (old_brush)
|
if (old_brush)
|
||||||
*old_brush=Brush_original_pixels;
|
*old_brush = Brush_original_pixels;
|
||||||
else
|
else
|
||||||
free(old_brush);
|
free(Brush_original_pixels);
|
||||||
Brush_original_pixels=new_brush;
|
Brush_original_pixels = new_brush;
|
||||||
// Assign new brush
|
// Assign new brush
|
||||||
if (new_brush_remapped)
|
if (new_brush_remapped)
|
||||||
{
|
{
|
||||||
free(Brush);
|
free(Brush);
|
||||||
Brush=new_brush_remapped;
|
Brush = new_brush_remapped;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user