Skip to content

Commit

Permalink
HevSocks5Session: Free pbuf on send failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed May 10, 2021
1 parent c4c02d0 commit ba5073b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hev-socks5-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,8 @@ socks5_do_fwd_dns (HevSocks5Session *self)

/* send dns response */
hev_task_mutex_lock (self->mutex);
udp_sendto (self->udp, buf, &self->addr, self->port);
if (udp_sendto (self->udp, buf, &self->addr, self->port) != ERR_OK)
pbuf_free (buf);
hev_task_mutex_unlock (self->mutex);

return STEP_CLOSE_SESSION;
Expand Down

0 comments on commit ba5073b

Please sign in to comment.