[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] lua-sass
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 19 Oct 2012 13:16:25 -0300
Nice! But it leaks an sass_context if luaL_checkstring fails.
Consider changing
int struct sass_context* ctx = sass_new_context();
...
ctx->source_string = (char*)luaL_checkstring(L, 1);
to
char* source = (char*)luaL_checkstring(L, 1);
int struct sass_context* ctx = sass_new_context();
...
ctx->source_string = source;
BTW, I hope sass_compile does not write to source_string. But if it doesn't,
why isn't it const?