diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-12-09 13:16:37 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-09 13:16:37 +0100 |
commit | 804ff44523ab726fdb59b80193652465df0482ee (patch) | |
tree | 638d62dce7a3e1f4245cb53212e3e422f310be99 /nxcomp/src/Misc.h | |
parent | 6d7536bd4f5cad9a779c186bd2649b34ec71b367 (diff) | |
parent | 4dbee3a3f13657577f283bca22b281d7273c19e5 (diff) | |
download | nx-libs-804ff44523ab726fdb59b80193652465df0482ee.tar.gz nx-libs-804ff44523ab726fdb59b80193652465df0482ee.tar.bz2 nx-libs-804ff44523ab726fdb59b80193652465df0482ee.zip |
Merge branch 'uli42-pr/fix_memleaks' into 3.6.x
Attributes GH PR #575: https://github.com/ArcticaProject/nx-libs/pull/575
Fixes: ArcticaProject/nx-libs#569
Fixes: ArcticaProject/nx-libs#573
Diffstat (limited to 'nxcomp/src/Misc.h')
-rw-r--r-- | nxcomp/src/Misc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nxcomp/src/Misc.h b/nxcomp/src/Misc.h index 997630137..7808c34c2 100644 --- a/nxcomp/src/Misc.h +++ b/nxcomp/src/Misc.h @@ -54,6 +54,9 @@ using namespace std; #define EGET() (errno) #define ESTR() strerror(errno) +// a free() macro that clears the ptr after free +#define SAFE_FREE(ptr) do { free(ptr); ptr = NULL; } while (0) + // // TCP port offset applied to NX port specification. // |