summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-01-11 10:32:30 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2016-01-11 10:32:30 -0800
commitbdcadff5dfb6f9513b7c109bf1523b6003406c53 (patch)
treeba888001c1ddc31cf73319d3b255c9cc7d563117 /src
parent8bcd1ff32b880b3bb51217ba2eed3d204f4cbae8 (diff)
Removed unnecessary call to cmark_node_unlink in cmark_node_replace.
Diffstat (limited to 'src')
-rw-r--r--src/node.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/node.c b/src/node.c
index 0fd5573..ee1d6c3 100644
--- a/src/node.c
+++ b/src/node.c
@@ -734,8 +734,7 @@ int cmark_node_replace(cmark_node *oldnode, cmark_node *newnode) {
if (!cmark_node_insert_before(oldnode, newnode)) {
return 0;
}
- cmark_node_unlink(oldnode);
- cmark_node_free(oldnode);
+ cmark_node_free(oldnode); // free calls cmark_node_unlink
return 1;
}