Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lceasy.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ static int lcurl_easy_to_s(lua_State *L){
return 1;
}

static int lcurl_easy_cleanup_storage(lua_State *L, lcurl_easy_t *p){
static void lcurl_easy_cleanup_storage(lua_State *L, lcurl_easy_t *p){
int i;

if(p->storage != LUA_NOREF){
Expand Down
5 changes: 5 additions & 0 deletions src/lcurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ static int push_upper(lua_State *L, const char *str){
size_t i, n = strlen(str);
char *ptr = (n < sizeof(buffer))?&buffer[0]:malloc(n + 1);
if (!ptr) return 1;
if (n == 0) {
lua_pushlstring(L, "", 0);
if(ptr != &buffer[0]) free(ptr);
return 0;
}
for(i = 0; i < n; ++i){
if( (str[i] > 96 ) && (str[i] < 123) ) ptr[i] = str[i] - 'a' + 'A';
else ptr[i] = str[i];
Expand Down