File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,13 @@ static void dump_chain(const css_selector *selector);
137137#endif
138138
139139
140+ static css_bloom * css__get_empty_bloom (void )
141+ {
142+ static css_bloom empty_bloom [CSS_BLOOM_SIZE ];
143+ return empty_bloom ;
144+ }
145+
146+
140147static css_error css__create_node_data (struct css_node_data * * node_data )
141148{
142149 struct css_node_data * nd ;
@@ -157,7 +164,8 @@ static void css__destroy_node_data(struct css_node_data *node_data)
157164
158165 assert (node_data != NULL );
159166
160- if (node_data -> bloom != NULL ) {
167+ if (node_data -> bloom != NULL &&
168+ node_data -> bloom != css__get_empty_bloom ()) {
161169 free (node_data -> bloom );
162170 }
163171
@@ -606,8 +614,7 @@ static css_error css__get_parent_bloom(void *parent,
606614 * by something or not.
607615 * Note, parent bloom is only read from, and not
608616 * written to. */
609- static css_bloom empty_bloom [CSS_BLOOM_SIZE ];
610- bloom = empty_bloom ;
617+ bloom = css__get_empty_bloom ();
611618 }
612619 }
613620
You can’t perform that action at this time.
0 commit comments