Skip to content

Commit 36525e3

Browse files
committed
fixing leak in aggregation.pyx
1 parent 3976bba commit 36525e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/_libs/window/aggregations.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,7 @@ def roll_median_c(const float64_t[:] values, ndarray[int64_t] start,
835835

836836
if not is_monotonic_increasing_bounds:
837837
nobs = 0
838+
skiplist_destroy(sl)
838839
sl = skiplist_init(<int>win)
839840

840841
skiplist_destroy(sl)
@@ -1070,6 +1071,7 @@ def roll_quantile(const float64_t[:] values, ndarray[int64_t] start,
10701071
if i == 0 or not is_monotonic_increasing_bounds:
10711072
if not is_monotonic_increasing_bounds:
10721073
nobs = 0
1074+
skiplist_destroy(skiplist)
10731075
skiplist = skiplist_init(<int>win)
10741076

10751077
# setup

0 commit comments

Comments
 (0)