diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 32f57a3256..a6ee82a951 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -2221,6 +2221,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate, { tuple = do_convert_tuple(tuple, tupmap); free_conversion_map(tupmap); + free_tuple = true; } } break;