Allocating more memory when "save external"

Hi,
In object_bake_api.c,
in the method “static int bake”, the code is:

/* when saving externally always use the size specified in the UI */
num_pixels = (size_t)width * (size_t)height * bake_images.size;

But I think, it should be:

num_pixels = (size_t)width * (size_t)height;

We are unnecessarily creating more memory.
Please confirm.

Thanks in advance.

I don’t think so, it’s allocating memory for multiple images baked at the same time.