aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-24 08:19:49 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-24 08:19:49 +0100
commit46d4f2211104a4e908084d948a6328331725bf1c (patch)
treef2f037f0051be948f42de1a9ba45fe8fb7c38e62
parent4955a7ad5e6a89ea03d8d62bb2e0735c701624b9 (diff)
dvbv5-daemon: don't dereference a null pointer
The print message there can dereference a null pointer, if the first check is true. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--utils/dvb/dvbv5-daemon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/utils/dvb/dvbv5-daemon.c b/utils/dvb/dvbv5-daemon.c
index 43b5c777..ac122b15 100644
--- a/utils/dvb/dvbv5-daemon.c
+++ b/utils/dvb/dvbv5-daemon.c
@@ -845,8 +845,7 @@ static int dev_open(uint32_t seq, char *cmd, int fd, char *buf, ssize_t size)
if (!p) {
local_perror("tsearch");
uid = 0;
- }
- if (*p != desc) {
+ } else if (*p != desc) {
err("uid %d was already opened!", uid);
}

Privacy Policy