always check tmsg for null prior to freeing it

This commit is contained in:
Nikos Mavrogiannopoulos
2015-03-02 16:28:22 +01:00
parent 3da0b450b9
commit 05accfeb0d

View File

@@ -170,7 +170,8 @@ int handle_worker_commands(struct worker_st *ws)
return 0;
udp_fd_fail:
udp_fd_msg__free_unpacked(tmsg, NULL);
if (tmsg)
udp_fd_msg__free_unpacked(tmsg, NULL);
if (ws->dtls_tptr.fd == -1)
ws->udp_state = UP_DISABLED;