QPID-4493: Fixes memory leak in Perl bindings.

Contributed by: Jimmy Jones <jimmyjones2@gmx.co.uk>