Skip to content

Commit

Permalink
reduce memory moves
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jul 26, 2021
1 parent 386f933 commit 316adb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MagickCore/histogram.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ static MagickBooleanType CheckImageColors(const Image *image,
Add this unique color to the color list.
*/
if (node_info->number_unique == 0)
node_info->list=(PixelInfo *) AcquireQuantumMemory(1,
node_info->list=(PixelInfo *) AcquireQuantumMemory(max_colors,
sizeof(*node_info->list));
else
node_info->list=(PixelInfo *) ResizeQuantumMemory(node_info->list,
Expand Down

0 comments on commit 316adb6

Please sign in to comment.