Revision: 41218
http://brlcad.svn.sourceforge.net/brlcad/?rev=41218&view=rev
Author: brlcad
Date: 2010-11-02 11:10:21 +0000 (Tue, 02 Nov 2010)
Log Message:
-----------
need another pair of core eyes on this but this looks like an outright bug in
the logic! checking the wrong left/right side during db_tree_parse(). the
intent seems clear so fix it so we do not return a corrupt tree pointer (with a
non-null left and null right). no telling the damage that has caused.
Modified Paths:
--------------
brlcad/trunk/src/librt/db_tree.c
Modified: brlcad/trunk/src/librt/db_tree.c
===================================================================
--- brlcad/trunk/src/librt/db_tree.c 2010-11-02 10:51:58 UTC (rev 41217)
+++ brlcad/trunk/src/librt/db_tree.c 2010-11-02 11:10:21 UTC (rev 41218)
@@ -2485,9 +2485,7 @@
/* Clean up any remaining sub-trees still in reg_trees[] */
for (i=0; i < new_reg_count; i++) {
- if (reg_trees[i] != TREE_NULL) {
- db_free_tree(reg_trees[i], resp);
- }
+ db_free_tree(reg_trees[i], resp);
}
bu_free((char *)reg_trees, "*reg_trees[]");
@@ -3052,8 +3050,7 @@
goto out;
}
tp->tr_b.tb_right = db_tree_parse(vls, argv[2], resp);
- if (tp->tr_b.tb_left == TREE_NULL) {
- db_free_tree(tp->tr_b.tb_left, resp);
+ if (tp->tr_b.tb_right == TREE_NULL) {
RT_FREE_TREE(tp, resp);
tp = TREE_NULL;
goto out;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits