Skip to content

Commit

Permalink
Deletion of the NULL checks when calling free (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
angelrti authored Jan 16, 2024
1 parent fdc4990 commit fbbab5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions srcCxx/shape_main.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ class ShapeOptions {
//-------------------------------------------------------------
~ShapeOptions()
{
if (topic_name) free(topic_name);
if (color) free(color);
if (partition) free(partition);
free(topic_name);
free(color);
free(partition);
}

//-------------------------------------------------------------
Expand Down Expand Up @@ -724,7 +724,7 @@ class ShapeApplication {
if (dp) dp->delete_contained_entities( );
if (dpf) dpf->delete_participant( dp );

if (color) free(color);
free(color);
}

//-------------------------------------------------------------
Expand Down

0 comments on commit fbbab5d

Please sign in to comment.