Skip to content

Commit

Permalink
Fix memory leak on handled packets
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jan 28, 2009
1 parent 4c883df commit 8893cc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dtls.c
Expand Up @@ -473,6 +473,7 @@ int dtls_mainloop(struct openconnect_info *vpninfo, int *timeout)
vpninfo->progress(vpninfo, PRG_TRACE,
"Sent DTLS packet of %d bytes; SSL_write() returned %d\n",
this->len, ret);
free(this);
}

return work_done;
Expand Down
1 change: 1 addition & 0 deletions tun.c
Expand Up @@ -335,6 +335,7 @@ int tun_mainloop(struct openconnect_info *vpninfo, int *timeout)
vpninfo->quit_reason = "Client connection terminated";
return 1;
}
free(this);
}
/* Work is not done if we just got rid of packets off the queue */
return work_done;
Expand Down

0 comments on commit 8893cc4

Please sign in to comment.