Skip to content

Commit 6f4b6ff

Browse files
committed
Improve memory handling
1 parent f50c257 commit 6f4b6ff

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

selectolax/lexbor/selection.pxi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ cdef class LexborCSSSelector:
7575
status = lxb_selectors_find(self.selectors, node.node, selectors_list,
7676
<lxb_selectors_cb_f> css_matcher_callback, <void *> self)
7777
if status != LXB_STATUS_OK:
78+
lxb_css_selector_list_destroy_memory(selectors_list)
7879
raise SelectolaxError("Can't parse CSS selector.")
7980
result = bool(self.results)
8081
self.results = []

0 commit comments

Comments
 (0)