diff options
author | cbdev <cb@cbcdn.com> | 2019-06-01 17:56:33 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-06-01 17:56:33 +0200 |
commit | 92a291b5fae32caba2212192bc94b8ef568c362d (patch) | |
tree | 826a2b0d8930afa464ed15a1518a85d062869d1a /websocket.c | |
parent | e16f061a715eb0d49a4872f7cc8c7bb58bb6e888 (diff) | |
download | websocksy-92a291b5fae32caba2212192bc94b8ef568c362d.tar.gz websocksy-92a291b5fae32caba2212192bc94b8ef568c362d.tar.bz2 websocksy-92a291b5fae32caba2212192bc94b8ef568c362d.zip |
Implement plugin loading
Diffstat (limited to 'websocket.c')
-rw-r--r-- | websocket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/websocket.c b/websocket.c index ab33a88..fe4a39a 100644 --- a/websocket.c +++ b/websocket.c @@ -66,8 +66,9 @@ int ws_close(websocket* ws, ws_close_reason code, char* reason){ for(p = 0; p < ws->protocols; p++){ free(ws->protocol[p]); } - ws->protocols = 0; + free(ws->protocol); ws->protocol = NULL; + ws->protocols = 0; ws->read_buffer_offset = 0; ws->peer_buffer_offset = 0; |