diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-09-10 17:48:29 +0930 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-09-11 00:31:34 +0930 |
commit | 82cebb165b22d5409c9d4d31554a8da0c867e0d3 (patch) | |
tree | b0dd708e636dec598bd3263119165f6b92ea1a65 | |
parent | a82e1dcc8ad095581402d05e5d1ae1bbf3646954 (diff) |
Check for NULL strings before calling strdup.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
-rw-r--r-- | utils.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -237,7 +237,7 @@ uInformation(const char * /* s */ , ... ); #endif #ifdef HAVE_STRDUP -#define uStringDup(s1) (strdup(s1)) +#define uStringDup(s1) ((s1) ? strdup(s1) : NULL) #else extern char *uStringDup(const char * /* s1 */ ); |