rem: error: for (i = 0; i < 3; i++) { if (matrix->data[i]) wfree(matrix->data[i]); } if (matrix) wfree(matrix); RErrorCode = RERR_NOMEMORY; return NULL;
context: wheelCreateMatrix(unsigned int width, unsigned int height){    wheelMatrix	*matrix = NULL;    int	i;        assert((width > 0) && (height > 0));        matrix = malloc(sizeof(wheelMatrix));    if (!matrix) {	RErrorCode = RERR_NOMEMORY;	return NULL;    }        memset(matrix, 0, sizeof(wheelMatrix));    matrix->width = width;    matrix->height = height;    for (i = 0; i < 3; i++) {	matrix->data[i] = malloc(width*height*sizeof(unsigned char));	if (!matrix->data[i])	    goto error;    }        return matrix;        error:    for (i = 0; i < 3; i++) {	if (matrix->data[i])	    wfree(matrix->data[i]);    }    if (matrix)	wfree(matrix);    RErrorCode = RERR_NOMEMORY;    return NULL;}