diff options
| author | ame <[email protected]> | 2025-06-12 15:12:50 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2025-06-12 15:12:50 -0500 |
| commit | c6714b7212548a55de8ed9e22f4b416f312358b0 (patch) | |
| tree | 181604c480937d58b7479724d0480438f9f8ddd8 /src | |
| parent | fe09d3576ada9918f55431298c5d9a099e690761 (diff) | |
remove logging and fix streaming crash
Diffstat (limited to 'src')
| -rw-r--r-- | src/lua.c | 2 | ||||
| -rw-r--r-- | src/net.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -112,9 +112,7 @@ int _stream_free(lua_State* L){ lua_gettable(L, 1);
void* state = lua_touserdata(L, -1);
- printf("call free\n");
if(rf != NULL){
- printf("run free\n");
((stream_free_function)rf)(&state);
}
return 0;
@@ -413,7 +413,9 @@ int _srequest_free(void** _state){ free(state->state);
}
- str_free(state->buffer);
+ if(state->buffer != NULL){
+ str_free(state->buffer);
+ }
free(state);
return 0;
}
@@ -440,7 +442,7 @@ int _srequest_read(uint64_t reqlen, str** _output, void** _state){ memset(buffer, 0, BUFFER_LEN);
}
- if(state->state == NULL){
+ if(state->state != NULL){
str_pushl(output, state->state->content->c, state->state->content->len);
str_clear(state->state->content);
}
|
