Fix memory leak in the db_ido_pgsql module

fixes #7195

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>