Revision: 41378
http://brlcad.svn.sourceforge.net/brlcad/?rev=41378&view=rev
Author: brlcad
Date: 2010-11-16 19:10:00 +0000 (Tue, 16 Nov 2010)
Log Message:
-----------
somehow the build passed with this stray call to _ged_run_rt in here. good
thing, though, as this would have crashed without allocating memory to
gd_rt_cmd.
Modified Paths:
--------------
brlcad/trunk/src/libged/rrt.c
Modified: brlcad/trunk/src/libged/rrt.c
===================================================================
--- brlcad/trunk/src/libged/rrt.c 2010-11-16 19:01:32 UTC (rev 41377)
+++ brlcad/trunk/src/libged/rrt.c 2010-11-16 19:10:00 UTC (rev 41378)
@@ -39,6 +39,7 @@
{
char **vp;
int i;
+ size_t args;
static const char *usage = "options";
GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
@@ -49,16 +50,21 @@
/* initialize result */
bu_vls_trunc(&gedp->ged_result_str, 0);
+ args = argc + 2 + ged_count_tops(gedp);
+ gedp->ged_gdp->gd_rt_cmd = (char **)bu_calloc(args, sizeof(char *), "alloc
gd_rt_cmd");
+
vp = &gedp->ged_gdp->gd_rt_cmd[0];
for ( i=1; i < argc; i++ )
*vp++ = (char *)argv[i];
*vp++ = gedp->ged_wdbp->dbip->dbi_filename;
_ged_current_gedp = gedp;
+ _ged_current_gedp->ged_gdp->gd_rt_cmd_len = ged_build_tops(gedp,
_ged_current_gedp->ged_gdp->gd_rt_cmd,
&_ged_current_gedp->ged_gdp->gd_rt_cmd[args]);
- _ged_setup_rt(gedp, vp, 1);
(void)_ged_run_rt(gedp);
+ bu_free(gedp->ged_gdp->gd_rt_cmd, "free gd_rt_cmd");
+
return GED_OK;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits