File tree Expand file tree Collapse file tree
src/test/modules/test_binaryheap Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ test_basic(int size)
135135
136136 if (!binaryheap_empty (heap ))
137137 elog (ERROR , "heap not empty after removing all nodes" );
138+ binaryheap_free (heap );
138139}
139140
140141/*
@@ -154,6 +155,7 @@ test_build(int size)
154155
155156 binaryheap_build (heap );
156157 verify_heap_property (heap );
158+ binaryheap_free (heap );
157159}
158160
159161/*
@@ -181,6 +183,7 @@ test_remove_node(int size)
181183
182184 if (binaryheap_size (heap ) != size - remove_count )
183185 elog (ERROR , "wrong size after removing nodes" );
186+ binaryheap_free (heap );
184187}
185188
186189/*
@@ -211,6 +214,7 @@ test_replace_first(int size)
211214 */
212215 binaryheap_replace_first (heap , Int32GetDatum (size + 1 ));
213216 verify_heap_property (heap );
217+ binaryheap_free (heap );
214218}
215219
216220/*
@@ -230,6 +234,7 @@ test_duplicates(int size)
230234 if (DatumGetInt32 (binaryheap_remove_first (heap )) != dup )
231235 elog (ERROR , "unexpected value in heap with duplicates" );
232236 }
237+ binaryheap_free (heap );
233238}
234239
235240/*
@@ -247,6 +252,7 @@ test_reset(int size)
247252
248253 if (!binaryheap_empty (heap ))
249254 elog (ERROR , "heap not empty after resetting" );
255+ binaryheap_free (heap );
250256}
251257
252258/*
You can’t perform that action at this time.
0 commit comments