window: Free allocated memory on error path
diff --git a/clients/window.c b/clients/window.c
index 2baf4d9..0701981 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -4241,6 +4241,7 @@
 	d->display = wl_display_connect(NULL);
 	if (d->display == NULL) {
 		fprintf(stderr, "failed to create display: %m\n");
+		free(d);
 		return NULL;
 	}