From: Philippe De Swert
udev_monitor_enable_receiving() enables a udev_monitor to recieve
events. If this fails, the worker here created most likely won't
recieve any events and will probably not be very useful. So now
we check if the event recieving is activated before creating the
new worker.
From: Philippe De Swert
ordered_hashmap_steal_first() can return NULL (and this is usually checked
except here), so there is a potential NULL pointer reference.
Thus moving the NULL check to cover both possible allocations of the
ChainCacheItem.
Found with coverity. Fixes: CID#1249723
---
src/j
From: Philippe De Swert
Remove the following warning during the compilation:
src/libsystemd-terminal/grdev-drm.c: In function 'grdrm_card_hotplug':
src/libsystemd-terminal/grdev-drm.c:1087:45: warning: 'fb' may be used
uninitialized in this function [-Wmaybe-uninitialized]
src/libsystemd-termina
From: Philippe De Swert
"Fix" the following warning:
src/journal/coredump.c: In function ‘main’:
src/journal/coredump.c:717:42: warning: ‘sz’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
---
src/journal/coredump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
From: Philippe De Swert
Removes the following compilation warning:
src/shared/util.c: In function 'rm_rf_children_dangerous':
src/shared/util.c:2800:22: warning: declaration of 'is_dir' shadows a global
declaration [-Wshadow]
In file included from src/shared/util.c:77:0:
src/shared/mkdir.h:45:5:
From: Philippe De Swert
Remove the following warning during compilation:
src/test/test-strv.c: In function ‘test_strv_quote_unquote’:
src/test/test-strv.c:140:56: warning: declaration of ‘split’ shadows a global
declaration [-Wshadow]
In file included from src/test/test-strv.c:25:0:
./src/shared
From: Philippe De Swert
This patchset silences a number of compiler warnings.
Most of them are more of a cosmetic nature, but can be
useful anyway ;)
Philippe De Swert (5):
journal : fix uninitialized var in coredump
libsystemd:terminal :fix uninitialized warning
resolve: Remove implicit d
From: Philippe De Swert
Removes this compilation warning:
src/resolve/resolved.c: In function ‘main’:
src/resolve/resolved.c:49:9: warning: implicit declaration of function
‘label_init’ [-Wimplicit-function-declaration]
src/resolve/resolved.c:49:9: warning: nested extern declaration of ‘label_in
From: Philippe De Swert
Cpu's are assigned normally, so starting at 0, so the MAX_CPU index will
always be one smaller than the actual number.
Found with Coverity.
---
src/bootchart/store.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootchart/store.c b/src/bootchart
From: Philippe De Swert
Gcc is spewing some warnings about uninitialized variables.
Let's get rid of the noise.
---
src/core/bus-endpoint.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/core/bus-endpoint.c b/src/core/bus-endpoint.c
index 1e8f07e..aac540d 100644
---
From: Philippe De Swert
When compiling we see this curl warning popping up:
src/journal-remote/journal-upload.c:194:17: warning: call to
‘_curl_easy_setopt_err_error_buffer’ declared with attribute
warning: curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE
as argument for this option [ena
From: Philippe De Swert
Hi,
While compiling systemd I came across these warnings. And as I recompile
a lot these days for Coverity they started to bug me and I just decided
to fix them as they are quite trivial issues.
Cheers!
Philippe De Swert (3):
journal-upload: Remove compilation warnin
From: Philippe De Swert
Gcc is spewing some warnings about uninitialized variables.
Let's get rid of the noise.
---
src/sysusers/sysusers.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index ba20d94..4203b3e 100644
---
From: Philippe De Swert
There is a very unlikely case where this can happen since gcc usually
does the sane thing. But let's make sure found_last is initialized anyway.
Fixes: CID#996386
---
src/journal/journal-verify.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/jou
From: Philippe De Swert
We only break out of the pre-ceding loop into the rest of the code
if fd is actually >= 0. So the < 0 check will never be true and
not necessary.
Found with Coverity. Fixes: CID#1237577
---
src/shared/util.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/src/share
From: Philippe De Swert
The r < 0 test has been done before we reach it in the loop, and we returned
out of the function. So this cannot be reached. But it could actually be that
something is missing.
---
src/libsystemd/sd-bus/bus-objects.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sr
From: Philippe De Swert
term_utf8_decode can return NULL. We definitely do not want
to dereference ucs4_str in case this happens.
Not really sure on what to return or handle this though.
---
src/libsystemd-terminal/term-screen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libsystem
From: Philippe De Swert
hashmap_get can return null, so as we dereference it
immediately after calling it, we could crash.
It is unlikely to occur though I expect. I am however unsure
what error should be reported (if at all).
Coverity CID#1237656
---
src/resolve/resolved-manager.c | 2 ++
1 fi
From: Philippe De Swert
The line under the last switch statement *loaded_policy = true;
would never be executed. As all switch cases return 0. Thus the
policy would never be marked as loaded.
Found with Coverity. Fixes: CID#1237785
---
src/core/smack-setup.c | 2 +-
1 file changed, 1 insertion
From: Philippe De Swert
In test_read_one_char the filehandle does not get its fclose
at the end of the function, thus we are leaking fd's.
Found with Coverity. Fixes: CID#1237749
Signed-off-by: Philippe De Swert
---
src/test/test-util.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/
From: Philippe De Swert
Found with Coverity. Fixes: CID#996435
Signed-off-by: Philippe De Swert
---
src/journal/journal-send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal/journal-send.c b/src/journal/journal-send.c
index bb1ef66..b7cc4bd 100644
--- a/src/jou
From: Philippe De Swert
Found with Coverity.
Signed-off-by: Philippe De Swert
---
src/activate/activate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/activate/activate.c b/src/activate/activate.c
index 8942773..0a1df37 100644
--- a/src/activate/activate.c
+++ b/src/
From: Philippe De Swert
Hi all,
Here are some more Coverity fixes. More in line with what I learned
today on the mailing list about the use of gcc macros.
Cheers,
Philippe
Philippe De Swert (3):
[file handle leak] Close file handle when we're done with it
[fd leak] Stop leaking an fd in
From: Philippe De Swert
m->kdbus could be freed before it is released. Changing the
order fixes the issue.
Found with Coverity. Fixes: CID#1237798
Signed-off-by: Philippe De Swert
---
src/libsystemd/sd-bus/bus-message.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a
From: Philippe De Swert
After a section of memory is succesfully allocated, some of the following
actions can still fail due to lack of memory. In this case -ENOMEM is
returned without actually freeing the already mapped memory.
Found with coverity. Fixes: CID#1237762
Signed-off-by: Philippe De
From: Philippe De Swert
Actually unref the buscreds when we are not going to return a
pointer to them. As when bus_creds_add_more fails we immediately
return the error code otherwise and leak the new buscreds.
Found with coverity. Fixes: CID#1237761
Signed-off-by: Philippe De Swert
---
src/lib
From: Philippe De Swert
When num is < 0 we jump to the error handling. However at that time
r is not set yet by keyboard_fill so we most likely get a nonsensical
error. However the num check is not needed as the xkb_state_key_get_syms
will not return negative values. From its documentation:
@retu
From: Philippe De Swert
In case set_consume goes wrong, the pattern name has already been
freed. So we do not try to print it in the logs, assuming the pattern
addition print will be printed just before the failure anyway. Found
with coverity. Fixes: CID#1237798
Signed-off-by: Philippe De Swert
From: Philippe De Swert
Hi,
Yesterday I finally got to revive the systemd Coverity project on
scan.coverity.org Unfortunately to see the errors reported you need
to sign up, but I will make sure to approve requests for seeing the
"bugs" whenever they show up.
Also I quickly made some quick fixe
29 matches
Mail list logo