Fix a memory leak by freeing last pBytes

Change-Id: I7d170d704fa8950057698856d12df63992e38381
Reviewed-on: https://gerrit.libreoffice.org/8822
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>