diff options
Diffstat (limited to 'sender.c')
-rw-r--r-- | sender.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -53,8 +53,6 @@ void send_udp(int sock, mbedtls_ctr_drbg_context *ctr_drbg, const uint8_t *text, | |||
53 | output + 1 + SESSION_ID_LENGTH + GCM_IV_LENGTH)) { | 53 | output + 1 + SESSION_ID_LENGTH + GCM_IV_LENGTH)) { |
54 | sendto(sock, output, total_length, 0, (struct sockaddr*)&logging_host_address, logging_host_address_len); | 54 | sendto(sock, output, total_length, 0, (struct sockaddr*)&logging_host_address, logging_host_address_len); |
55 | } | 55 | } |
56 | |||
57 | mbedtls_gcm_free(&ctx); | ||
58 | } | 56 | } |
59 | 57 | ||
60 | void new_session(int sock, mbedtls_ctr_drbg_context *ctr_drbg) { | 58 | void new_session(int sock, mbedtls_ctr_drbg_context *ctr_drbg) { |
@@ -120,5 +118,6 @@ int main() { | |||
120 | send_udp(sock, &ctr_drbg, logline, strlen((char*)logline)); | 118 | send_udp(sock, &ctr_drbg, logline, strlen((char*)logline)); |
121 | send_udp(sock, &ctr_drbg, logline, strlen((char*)logline)); | 119 | send_udp(sock, &ctr_drbg, logline, strlen((char*)logline)); |
122 | 120 | ||
121 | mbedtls_gcm_free(&ctx); | ||
123 | close(sock); | 122 | close(sock); |
124 | } | 123 | } |