mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-09 08:18:09 +02:00
nested: Free client struct on launch_client error paths
This commit is contained in:
parent
f1144dd0dc
commit
6773394000
1 changed files with 3 additions and 0 deletions
|
|
@ -207,6 +207,7 @@ launch_client(struct nested *nested, const char *path)
|
|||
fprintf(stderr, "launch_client: "
|
||||
"socketpair failed while launching '%s': %m\n",
|
||||
path);
|
||||
free(client);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -214,6 +215,7 @@ launch_client(struct nested *nested, const char *path)
|
|||
if (pid == -1) {
|
||||
close(sv[0]);
|
||||
close(sv[1]);
|
||||
free(client);
|
||||
fprintf(stderr, "launch_client: "
|
||||
"fork failed while launching '%s': %m\n", path);
|
||||
return NULL;
|
||||
|
|
@ -246,6 +248,7 @@ launch_client(struct nested *nested, const char *path)
|
|||
client->client = wl_client_create(nested->child_display, sv[0]);
|
||||
if (!client->client) {
|
||||
close(sv[0]);
|
||||
free(client);
|
||||
fprintf(stderr, "launch_client: "
|
||||
"wl_client_create failed while launching '%s'.\n",
|
||||
path);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue