diff options
author | lns <matzeton@googlemail.com> | 2022-04-24 23:49:57 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2022-04-24 23:49:57 +0200 |
commit | a46fc4153d0dd6b400c49a8f6d1e794f0d940ab7 (patch) | |
tree | cf67ab3e1cd672941f8d12ec19de11c2300d7254 /dependencies | |
parent | 22a8d04c748ff3e04ca11c5c29b4433c7136f5f5 (diff) |
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 <matzeton@googlemail.com>
Diffstat (limited to 'dependencies')
-rw-r--r-- | dependencies/nDPIsrvd.h | 5 |
1 files changed, 5 insertions, 0 deletions
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, |