window: Free allocated memory on error path
This commit is contained in:
committed by
Kristian Høgsberg
parent
c59a33a1e2
commit
f0a1af9f02
@@ -4241,6 +4241,7 @@ display_create(int argc, char *argv[])
|
||||
d->display = wl_display_connect(NULL);
|
||||
if (d->display == NULL) {
|
||||
fprintf(stderr, "failed to create display: %m\n");
|
||||
free(d);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user