mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
Use assert to check client is not NULL
This commit is contained in:
parent
c34bd9575f
commit
b054bc2591
1 changed files with 2 additions and 4 deletions
|
|
@ -16,6 +16,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "snap-policy.h"
|
#include "snap-policy.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#define SNAP_LABEL_PREFIX "snap."
|
#define SNAP_LABEL_PREFIX "snap."
|
||||||
|
|
||||||
|
|
@ -61,10 +62,7 @@ pw_sandbox_access_t pw_snap_get_audio_permissions(struct client *client, int fd,
|
||||||
int exit_code;
|
int exit_code;
|
||||||
|
|
||||||
*app_id = g_strdup("unknown");
|
*app_id = g_strdup("unknown");
|
||||||
if (client == NULL) {
|
assert(client != NULL);
|
||||||
pw_log_warn("Called snap_get_audio_permissions with NULL parameter.");
|
|
||||||
return PW_SANDBOX_ACCESS_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (aa_getpeercon(fd, &aa_label, &snap_confinement) == -1) {
|
if (aa_getpeercon(fd, &aa_label, &snap_confinement) == -1) {
|
||||||
if (errno == EINVAL) {
|
if (errno == EINVAL) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue