Permalink
Browse files

fix SIGSEGV in xwatch if xcb_parse_display() fails

  • Loading branch information...
1 parent 6c8059b commit f54b212fad7795fc4fa006d731a33879f12ee635 @gajdusek gajdusek committed Mar 31, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 modules/xwatch.c
View
@@ -150,11 +150,11 @@ int create_connection(struct x_server *xs) {
g_debug("create x-watch connection: '%s'", xs->display);
parsed = xcb_parse_display(xs->display, &host, &dsp, &screenNum);
- free(host);
if(!parsed) {
g_warning("can't parse display: '%s'", xs->display);
return FALSE;
}
+ free(host);
dispbuflen = snprintf(dispbuf, sizeof(dispbuf), "%d", dsp);

0 comments on commit f54b212

Please sign in to comment.