Fix in-band signalling in __pmGetPDU resulting in memory leak
Fix in-band signalling in __pmGetPDU resulting in memory leak

The return value of __pmGetPDU is both an error code and the value of
the type field of the PDU.  A negative type value is treated as an error
by HandleClientInput, and the PDU is never unpinned, even though it was
pinned by __pmGetPDU because there was no error.  This leads to a memory
leak and eventual pmcd crash.

Original report and fixes reviewed by Florian Weimer of the Red Hat
Security team.  Red Hat bugzilla bug #841319.

Security advisory CVE-2012-3420.

wuliming/pcp,andyvand/cygpcpfans,aeg-aeg/pcpfans,adfernandes/pcp,tjanez/pcp,wuliming/pcp,tjanez/pcp,andyvand/cygpcpfans,mbaldessari/pcp,aeg-aeg/pcpfans,adfernandes/pcp,ryandoyle/pcp_original,adfernandes/pcp,ryandoyle/pcp_original,adfernandes/pcp,ryandoyle/pcp_original,aeg-aeg/pcpfans,andyvand/cygpcpfans,wuliming/pcp,wuliming/pcp,tjanez/pcp,wuliming/pcp,edwardt/pcp,edwardt/pcp,andyvand/cygpcpfans,adfernandes/pcp,prasincs/pcp,wuliming/pcp,edwardt/pcp,mbaldessari/pcp,andyvand/cygpcpfans,mbaldessari/pcp,prasincs/pcp,aeg-aeg/pcpfans,aeg-aeg/pcpfans,edwardt/pcp,andyvand/cygpcpfans,wuliming/pcp,tjanez/pcp,ryandoyle/pcp_original,mbaldessari/pcp,ryandoyle/pcp_original,edwardt/pcp,prasincs/pcp,prasincs/pcp,ryandoyle/pcp_original,prasincs/pcp,ryandoyle/pcp_original,adfernandes/pcp,andyvand/cygpcpfans,adfernandes/pcp,ryandoyle/pcp_original,wuliming/pcp,aeg-aeg/pcpfans,mbaldessari/pcp,adfernandes/pcp,prasincs/pcp,aeg-aeg/pcpfans,tjanez/pcp,edwardt/pcp,mbaldessari/pcp,tjanez/pcp,tjanez/pcp,prasincs/pcp,andyvand/cygpcpfans,edwardt/pcp,edwardt/pcp,tjanez/pcp,prasincs/pcp,aeg-aeg/pcpfans