From: Philippe De Swert philippe.desw...@jollamobile.com
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
From: Philippe De Swert philippedesw...@gmail.com
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.
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippe.desw...@jollamobile.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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(-)
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
---
From: Philippe De Swert philippedesw...@gmail.com
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(+)
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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:
From: Philippe De Swert philippedesw...@gmail.com
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 philippedesw...@gmail.com
---
src/libsystemd/sd-bus/bus-message.c | 6 +++---
1 file
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
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
From: Philippe De Swert philippedesw...@gmail.com
Found with Coverity.
Signed-off-by: Philippe De Swert philippedesw...@gmail.com
---
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
From: Philippe De Swert philippedesw...@gmail.com
Found with Coverity. Fixes: CID#996435
Signed-off-by: Philippe De Swert philippedesw...@gmail.com
---
src/journal/journal-send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal/journal-send.c
From: Philippe De Swert philippedesw...@gmail.com
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 philippedesw...@gmail.com
---
src/test/test-util.c | 1 +
28 matches
Mail list logo