projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5060dc
)
libfreerdp-utils/memory: add a pointer check in xstrdup.
author
Vic Lee
<llyzs@163.com>
Sun, 25 Sep 2011 03:49:09 +0000
(11:49 +0800)
committer
Vic Lee
<llyzs@163.com>
Sun, 25 Sep 2011 03:49:09 +0000
(11:49 +0800)
libfreerdp-utils/memory.c
patch
|
blob
|
history
diff --git
a/libfreerdp-utils/memory.c
b/libfreerdp-utils/memory.c
index
f20c9d2
..
a3077fd
100644
(file)
--- a/
libfreerdp-utils/memory.c
+++ b/
libfreerdp-utils/memory.c
@@
-105,6
+105,9
@@
char* xstrdup(const char* str)
{
char* mem;
+ if (str == NULL)
+ return NULL;
+
#ifdef _WIN32
mem = _strdup(str);
#else