Fixed the leaks in poll and select
Merge pull request #5 from IamBc/master

Fixed the leaks in poll_target and select_passive_target