worker: always free the previous msg in an fd update

This commit is contained in:
Nikos Mavrogiannopoulos
2016-03-28 15:49:48 +02:00
parent 2f684a227b
commit 6bd1d0b0e0

View File

@@ -145,7 +145,7 @@ int handle_commands_from_main(struct worker_st *ws)
if (ws->dtls_tptr.fd != -1)
close(ws->dtls_tptr.fd);
if (tmsg && ws->dtls_tptr.msg != NULL)
if (ws->dtls_tptr.msg != NULL)
udp_fd_msg__free_unpacked(ws->dtls_tptr.msg, NULL);
ws->dtls_tptr.msg = tmsg;