File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2025,17 +2025,21 @@ static char * build_union_sql (void) {
20252025 CLOUDSYNC_RLS_RESTRICTED_VALUE_BYTEA
20262026 );
20272027
2028- pfree ((void * )quoted_base_ident );
2028+ // Only free quoted identifiers if they're different from the input
2029+ // (quote_identifier returns input pointer if no quoting needed)
2030+ if (quoted_base_ident != base ) pfree ((void * )quoted_base_ident );
20292031 pfree (joincond .data );
20302032 pfree (caseexpr .data );
2031-
2033+
20322034 pfree (base );
2033-
2035+ pfree (base_lit );
2036+
20342037 pfree (quoted_base );
2038+ pfree (nsp_lit );
20352039 pfree (nsp );
2036- pfree ((void * )quoted_nsp );
2040+ if ( quoted_nsp != nsp ) pfree ((void * )quoted_nsp );
20372041 pfree (rel );
2038- pfree ((void * )quoted_rel );
2042+ if ( quoted_rel != rel ) pfree ((void * )quoted_rel );
20392043 }
20402044 if (nsp_list ) pfree (nsp_list );
20412045 if (rel_list ) pfree (rel_list );
You can’t perform that action at this time.
0 commit comments