From a46fc4153d0dd6b400c49a8f6d1e794f0d940ab7 Mon Sep 17 00:00:00 2001 From: lns Date: Sun, 24 Apr 2022 23:49:57 +0200 Subject: nDPId: Merged nDPId_flow_(info|finished) into nDPId_flow * nDPIsrvd: Fixed buffer allocation error due to missing memset() on disconnect * nDPIsrvd: Removed unused struct members Signed-off-by: lns --- dependencies/nDPIsrvd.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dependencies') diff --git a/dependencies/nDPIsrvd.h b/dependencies/nDPIsrvd.h index 390dd1416..b8076d919 100644 --- a/dependencies/nDPIsrvd.h +++ b/dependencies/nDPIsrvd.h @@ -394,6 +394,8 @@ static inline void nDPIsrvd_buffer_free(struct nDPIsrvd_buffer * const buffer) { nDPIsrvd_free(buffer->ptr.raw); buffer->ptr.raw = NULL; + buffer->used = 0; + buffer->max = 0; } static inline int nDPIsrvd_json_buffer_init(struct nDPIsrvd_json_buffer * const json_buffer, size_t json_buffer_size) @@ -412,6 +414,9 @@ static inline int nDPIsrvd_json_buffer_init(struct nDPIsrvd_json_buffer * const static inline void nDPIsrvd_json_buffer_free(struct nDPIsrvd_json_buffer * const json_buffer) { nDPIsrvd_buffer_free(&json_buffer->buf); + json_buffer->json_string_start = 0ul; + json_buffer->json_string_length = 0ull; + json_buffer->json_string = NULL; } static inline struct nDPIsrvd_socket * nDPIsrvd_socket_init(size_t global_user_data_size, -- cgit v1.2.3