gluScaleImage

Hello, I have a problem in this code

 
typedef struct {
GLubyte rgbRed;
GLubyte rgbGreen;
GLubyte rgbBlue;
GLubyte rgbAlpha;
} CGLRGB;
 
CGLRGB* Tex;
Tmp = (CGLRGB *) malloc (Height*Width*4);
CGLRGB* Tex;
Tex = (CGLRGB *) malloc(2Height*2Width*4); 
GLenum error;
error = gluScaleImage(GL_RGBA,Width, Height, GL_UNSIGNED_BYTE, Tmp,2Width, 2Height, GL_UNSIGNED_BYTE, Tex);
const GLubyte *errorbyte;
errorbyte = gluErrorString(error);

errorbyte = out_of_memory
Why???

post the complete code block. otherwise, id say you are out of memory, and so would gl, apparently.