charon-cmd: use a copy of pid in initiate callback
authorMartin Willi <martin@revosec.ch>
Thu, 20 Jun 2013 09:02:28 +0000 (11:02 +0200)
committerMartin Willi <martin@revosec.ch>
Thu, 20 Jun 2013 09:02:28 +0000 (11:02 +0200)
commit47ec2e407bbe98d239e14024cb4bebe83f42dd2a
tree502ad8e3694cadb8b88d95b178869cc4a9e6daa0
parente044a1a9e5088854290e0160f8ab370f2965a945
charon-cmd: use a copy of pid in initiate callback

When cancelling a connection that gets established, cmd_connection_t gets
freed before terminate() is called. This results in kill()ing invalid PID.
src/charon-cmd/cmd/cmd_connection.c