pulse-server: remove unnecessary NULL checks

`free()` and `pw_properties_free()` already include a NULL
check before proceeding.
This commit is contained in:
Barnabás Pőcze 2021-11-16 18:25:32 +01:00 committed by Wim Taymans
parent 089d7726dc
commit 9c218b2d08
2 changed files with 3 additions and 8 deletions

View file

@ -144,11 +144,8 @@ void client_free(struct client *client)
free(client->default_sink); free(client->default_sink);
free(client->default_source); free(client->default_source);
if (client->props) pw_properties_free(client->props);
pw_properties_free(client->props); pw_properties_free(client->routes);
if (client->routes)
pw_properties_free(client->routes);
free(client); free(client);
} }

View file

@ -2216,9 +2216,7 @@ static int do_finish_upload_stream(struct client *client, uint32_t command, uint
error_errno: error_errno:
res = -errno; res = -errno;
if (sample != NULL) { free(sample);
free(sample);
}
goto error; goto error;
error_invalid: error_invalid:
res = -EINVAL; res = -EINVAL;