summaryrefslogtreecommitdiff
path: root/cwebhook.c
diff options
context:
space:
mode:
authorstderr64 <linuxwizard@voidnet.dy.fi>2024-01-27 23:36:01 +0200
committerstderr64 <linuxwizard@voidnet.dy.fi>2024-01-27 23:36:01 +0200
commitbee0ea1cf58e1dd7ca9221105ddade3d5b4ddcbe (patch)
tree3669ed9255f59dfb28e5cbe555e45f2ec67f1ab9 /cwebhook.c
parentd1c49a48eabd5276c756fea9dea430c7625dd989 (diff)
downloadCWebHook-bee0ea1cf58e1dd7ca9221105ddade3d5b4ddcbe.tar.gz
CWebHook-bee0ea1cf58e1dd7ca9221105ddade3d5b4ddcbe.tar.zst
Just to make sure no more than expected amount of characters is tried to be read when handling http headers
Diffstat (limited to 'cwebhook.c')
-rw-r--r--cwebhook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cwebhook.c b/cwebhook.c
index b03d752..5dd6126 100644
--- a/cwebhook.c
+++ b/cwebhook.c
@@ -35,10 +35,10 @@ log_file_t ldata;
void safe_exit( int sigc, siginfo_t *s_info, void *ectx ){
if ( ssocket.tls_context != NULL )
SSL_CTX_free( ssocket.tls_context );
- if ( ssocket.socket_fd > 0 )
- close( ssocket.socket_fd );
if ( ssocket.client_socket_fd > 0 )
close( ssocket.client_socket_fd );
+ if ( ssocket.socket_fd > 0 )
+ close( ssocket.socket_fd );
if ( sconfig.config_parsed != NULL )
cJSON_Delete( sconfig.config_parsed );
if ( whinfo.webhooks_parsed != NULL )