Where does that get bu_free'd?  It'd be better to avoid dynamic allocation if 
at all possible.  You might be able to put it on the stack using something like 
"struct rt_db_internal tmp_internal; RT_DB_INTERNAL_INIT(&tmp_internal);" 
instead.  If you can't, it'd be worth inspecting why to see what'd it take to 
make it work.

Cheers!
Sean


On Jul 11, 2012, at 8:16 AM, phoenixy...@users.sourceforge.net wrote:

> Revision: 51455
>          http://brlcad.svn.sourceforge.net/brlcad/?rev=51455&view=rev
> Author:   phoenixyjll
> Date:     2012-07-11 12:16:45 +0000 (Wed, 11 Jul 2012)
> Log Message:
> -----------
> Initialize tmp_internal.
> 
> Modified Paths:
> --------------
>    brlcad/trunk/src/librt/primitives/hf/hf_brep.cpp
> 
> Modified: brlcad/trunk/src/librt/primitives/hf/hf_brep.cpp
> ===================================================================
> --- brlcad/trunk/src/librt/primitives/hf/hf_brep.cpp  2012-07-11 05:36:17 UTC 
> (rev 51454)
> +++ brlcad/trunk/src/librt/primitives/hf/hf_brep.cpp  2012-07-11 12:16:45 UTC 
> (rev 51455)
> @@ -42,7 +42,7 @@
> extern "C" void
> rt_hf_brep(ON_Brep **b, const struct rt_db_internal *ip, const struct bn_tol 
> *tol)
> {
> -    struct rt_db_internal *tmp_internal;
> +    struct rt_db_internal *tmp_internal = (struct rt_db_internal *) 
> bu_malloc(sizeof(struct rt_db_internal), "allocate structure");
>     RT_CK_DB_INTERNAL(ip);
>     *tmp_internal = *ip;
>     rt_hf_to_dsp(tmp_internal);
> 
> This was sent by the SourceForge.net collaborative development platform, the 
> world's largest Open Source development site.
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> BRL-CAD Source Commits mailing list
> brlcad-comm...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-commits


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to