diff --git a/src/cx.c b/src/cx.c index 2ffc45e..f688d1e 100644 --- a/src/cx.c +++ b/src/cx.c @@ -162,7 +162,6 @@ cx_init(CX_Context **cx_ctx) { gl_ctx->ProgramID_count = 0; gl_ctx->ProgramID_size = 1; - // Establish a model registry gl_ctx->mr = modelRegistry_new(); @@ -178,10 +177,6 @@ cx_init(CX_Context **cx_ctx) { goto err; } - - - - return 0; err: diff --git a/src/model.c b/src/model.c index c870c50..78b13f5 100644 --- a/src/model.c +++ b/src/model.c @@ -92,6 +92,7 @@ model_applyTransformations(Model *self) { if (!self->transformation_count) { retval = malloc(self->bufsize * 4 * sizeof(GLfloat)); memcpy(retval, self->object, self->bufsize * 4 * sizeof(GLfloat)); + tensor_free(temp_buffer[1]); return retval; } @@ -109,6 +110,7 @@ model_applyTransformations(Model *self) { ->data[j*temp_buffer[(i+1)%2]->width+k]; } } + tensor_free(temp_buffer[(i+1)%2]); return retval; }