From fbbab5d5a4f68849be0f1058db8514b4f75c0e8a Mon Sep 17 00:00:00 2001 From: Angel Martinez Date: Tue, 16 Jan 2024 12:59:00 +0100 Subject: [PATCH] Deletion of the NULL checks when calling free (#17) --- srcCxx/shape_main.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/srcCxx/shape_main.cxx b/srcCxx/shape_main.cxx index 512ddb5..8460381 100644 --- a/srcCxx/shape_main.cxx +++ b/srcCxx/shape_main.cxx @@ -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); } //------------------------------------------------------------- @@ -724,7 +724,7 @@ class ShapeApplication { if (dp) dp->delete_contained_entities( ); if (dpf) dpf->delete_participant( dp ); - if (color) free(color); + free(color); } //-------------------------------------------------------------