Revision: 56370
          http://sourceforge.net/p/brlcad/code/56370
Author:   starseeker
Date:     2013-07-31 03:20:10 +0000 (Wed, 31 Jul 2013)
Log Message:
-----------
Couple of more memory freeing responsibilities for the search command to live 
up to.

Modified Paths:
--------------
    brlcad/trunk/src/libged/search.c

Modified: brlcad/trunk/src/libged/search.c
===================================================================
--- brlcad/trunk/src/libged/search.c    2013-07-31 03:12:02 UTC (rev 56369)
+++ brlcad/trunk/src/libged/search.c    2013-07-31 03:20:10 UTC (rev 56370)
@@ -277,12 +277,15 @@
                    } else {
                        search_results = db_search_full_paths(dbplan, 
dispatch_list, gedp->ged_wdbp->dbip, gedp->ged_wdbp);
                        for (BU_LIST_FOR_BACKWARDS(result, db_full_path_list, 
&(search_results->l))) {
-                           bu_vls_printf(gedp->ged_result_str, "%s\n", 
db_path_to_string(result->path));
+                           char *path_string = db_path_to_string(result->path);
+                           bu_vls_printf(gedp->ged_result_str, "%s\n", 
path_string);
+                           bu_free(path_string, "free db_path_to_string 
output, per raytrace.h");
                        }
                        db_free_full_path_list(search_results);
                    }
                    db_free_full_path(new_entry->path);
                    BU_LIST_DEQUEUE(&(new_entry->l));
+                   bu_free(new_entry->path, "free new_entry path");
                    bu_free(new_entry, "free new_entry");
                }
            }
@@ -294,6 +297,7 @@
      * just assemble the full path list and return it */
     db_free_full_path(&dfp);
     db_free_full_path_list(path_list);
+    db_free_full_path_list(dispatch_list);
     bu_vls_free(&argvls);
     bu_free_argv(argc, argv);
     return TCL_OK;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to