From 66819c13cb1692f18314101bce8f724c79389834 Mon Sep 17 00:00:00 2001 From: Angel Martinez Date: Mon, 15 Jan 2024 20:04:09 +0100 Subject: [PATCH] Deletion of the NULL checks when calling free --- 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 77e3537..56a6d05 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); } //-------------------------------------------------------------