Skip to content

Commit

Permalink
(MRI) Fixed a memory leak in fragment parsing if nodes are not all su…
Browse files Browse the repository at this point in the history
…bsequently reparented. Closes #856
  • Loading branch information
flavorjones committed Mar 11, 2013
1 parent 5e04845 commit 2c176f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.ja.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* (JRuby) Adding an EntityReference after a Text node mangles the entity in JRuby. #835
* (JRuby) JRuby version inconsistency: nil for empty attributes. #818
* CSS queries for classes (e.g., ".foo") now treat all whitespace identically. #854
* (MRI) Fixed a memory leak in fragment parsing if nodes are not all subsequently reparented. #856


== 1.5.6 / 2012年12月19日

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* (JRuby) Adding an EntityReference after a Text node mangles the entity in JRuby. #835
* (JRuby) JRuby version inconsistency: nil for empty attributes. #818
* CSS queries for classes (e.g., ".foo") now treat all whitespace identically. #854
* (MRI) Fixed a memory leak in fragment parsing if nodes are not all subsequently reparented. #856


== 1.5.6 / 2012-12-19
Expand Down
1 change: 1 addition & 0 deletions ext/nokogiri/xml_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,7 @@ static VALUE in_context(VALUE self, VALUE _str, VALUE _options)

while (list) {
xmlXPathNodeSetAddUnique(set, list);
if (list->parent == NULL) nokogiri_root_node(list); // always the case?
list = list->next;
}

Expand Down

0 comments on commit 2c176f9

Please sign in to comment.