summaryrefslogtreecommitdiff
path: root/dist/libxcb/src/xcb_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'dist/libxcb/src/xcb_util.c')
-rw-r--r--dist/libxcb/src/xcb_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/dist/libxcb/src/xcb_util.c b/dist/libxcb/src/xcb_util.c
index a3357efde..a16270c63 100644
--- a/dist/libxcb/src/xcb_util.c
+++ b/dist/libxcb/src/xcb_util.c
@@ -265,6 +265,8 @@ static int _xcb_open(const char *host, char *protocol, const int display)
struct stat sbuf;
if (0 == stat(host, &sbuf)) {
file = strdup(host);
+ if(file == NULL)
+ return -1;
filelen = actual_filelen = strlen(file);
} else
#endif