Revision: 71614 http://sourceforge.net/p/brlcad/code/71614 Author: starseeker Date: 2018-08-29 13:52:31 +0000 (Wed, 29 Aug 2018) Log Message: ----------- guard free calls
Modified Paths: -------------- brlcad/trunk/src/libged/facetize.c Modified: brlcad/trunk/src/libged/facetize.c =================================================================== --- brlcad/trunk/src/libged/facetize.c 2018-08-29 01:21:44 UTC (rev 71613) +++ brlcad/trunk/src/libged/facetize.c 2018-08-29 13:52:31 UTC (rev 71614) @@ -1994,10 +1994,14 @@ bu_avs_free(&bnames); bu_avs_free(&rnames); - bu_ptbl_free(ar2); - bu_ptbl_free(ar); - bu_free(ar2, "ar table"); - bu_free(ar, "ar table"); + if (ar2) { + bu_ptbl_free(ar2); + bu_free(ar2, "ar table"); + } + if (ar) { + bu_ptbl_free(ar); + bu_free(ar, "ar table"); + } bu_free(dpa, "free dpa"); return ret; @@ -2397,12 +2401,18 @@ } } - bu_ptbl_free(pc); - bu_ptbl_free(ar2); - bu_ptbl_free(ar); - bu_free(pc, "pc table"); - bu_free(ar2, "ar table"); - bu_free(ar, "ar table"); + if (ar2) { + bu_ptbl_free(ar2); + bu_free(ar2, "ar table"); + } + if (ar) { + bu_ptbl_free(ar); + bu_free(ar, "ar table"); + } + if (pc) { + bu_ptbl_free(pc); + bu_free(pc, "pc table"); + } bu_free(dpa, "dpa array"); return ret; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits