aboutsummaryrefslogtreecommitdiff
path: root/include/omc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/omc.h')
-rw-r--r--include/omc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/omc.h b/include/omc.h
index d798b33..245a572 100644
--- a/include/omc.h
+++ b/include/omc.h
@@ -21,6 +21,10 @@
#include "recipe.h"
#include "relocation.h"
+#define guard_runtime_free(X) if (X) { runtime_free(X); X = NULL; }
+#define guard_strlist_free(X) if (X) { strlist_free(X); X = NULL; }
+#define guard_free(X) if (X) { free(X); X = NULL; }
+
#define COE_CHECK_ABORT(COND, MSG) {\
if (COND) { \
msg(OMC_MSG_ERROR, MSG ": Aborting execution (--continue-on-error/-C is not enabled)\n"); \