Skip to content

Commit

Permalink
now freeing heap memory for vertex label list
Browse files Browse the repository at this point in the history
  • Loading branch information
Brad Eric Hollister committed Aug 19, 2015
1 parent 0579025 commit c54ea02
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/mged/overlay.c
Expand Up @@ -81,7 +81,8 @@ cmd_overlay(ClientData UNUSED(clientData), Tcl_Interp *interp, int argc, const c
}

void
insert_index_label( struct bu_list* v_list, struct vertex* vert ) {
insert_index_label( struct bu_list* v_list, struct vertex* vert )
{

/* Copies data from struct vertex and
* insert into bu_list of index labels.
Expand All @@ -97,15 +98,13 @@ insert_index_label( struct bu_list* v_list, struct vertex* vert ) {
}

void
free_index_label_list( struct bu_list* v_list ) {
free_index_label_list( struct bu_list* v_list )
{
struct vtxlabel* curr_vl;

for( BU_LIST_FOR(curr_vl, vtxlabel, v_list) ) {
BU_LIST_DEQUEUE(curr_vl);
while (BU_LIST_WHILE(curr_vl, vtxlabel, v_list)) {
BU_LIST_DEQUEUE(&(curr_vl->l));
free(curr_vl);
}

free(v_list);
}

void
Expand Down

0 comments on commit c54ea02

Please sign in to comment.