diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2018-10-09 23:00:08 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2018-10-27 20:55:02 +0200 |
commit | 85a28a68e90537c3b82e83bd8ff07a8e116ff00a (patch) | |
tree | 40139a9d9135769d5fd16d2129634851a71b3053 /nx-X11/programs/Xserver/hw/nxagent/Utils.h | |
parent | fab6911bde09b5dc7dfe43269f97f5ddd5ecced5 (diff) | |
download | nx-libs-85a28a68e90537c3b82e83bd8ff07a8e116ff00a.tar.gz nx-libs-85a28a68e90537c3b82e83bd8ff07a8e116ff00a.tar.bz2 nx-libs-85a28a68e90537c3b82e83bd8ff07a8e116ff00a.zip |
Clipboard.c: add macro for safe XFree calls with ptr clearance
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Utils.h')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Utils.h b/nx-X11/programs/Xserver/hw/nxagent/Utils.h index 63904e23b..c0ad03345 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Utils.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Utils.h @@ -44,4 +44,6 @@ static inline const char * validateString(const char *str) { return str ? str : "(null)"; } +#define SAFE_XFree(what) do {if (what) {XFree(what); what = NULL;}} while (0) + #endif /* __Utils_H__ */ |