db_unixodbc: deallocate the results only after they are processed

	* closes bug #622 on the SF tracker
(cherry picked from commit d63ee19a8961b6019eda067c0b439f09d8126901)