Network: Fix re-declaration of variable in smaller scope

Like this another variable is created and used within that if-block. The original final_msg stays NULL and sendto will always fail.
This commit is contained in:
Flole998 2022-11-02 12:18:32 +01:00 committed by Nick Hainke
parent 15a6ce257f
commit da8d870d1e

View file

@ -148,7 +148,7 @@ int send_string(char *msg, bool is_enc) {
}
size_t b64_max_len = B64_ENCODE_LEN(gcrypt_len);
char* final_msg = dawn_malloc(b64_max_len);
final_msg = dawn_malloc(b64_max_len);
if (!final_msg) {
dawnlog_error("sendto() error: not enough memory\n");
dawn_free(gcrypt_buf);