Handle sd_event_default returning error and bail out properly
as done in every other caller of this function.
Found by coverity. Fixes: CID#1238957
---
src/journal-remote/journal-remote.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/journal-remote/journal-remote.c
The recently allocated "printed" is not freed on error path.
Found by coverity. Fixes: CID#1237745
---
src/shared/install.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/shared/install.c b/src/shared/install.c
index 5d3fcf5..61e572b 100644
--- a/src/shared/install.c
+
The "unit" string allocation is not freed on either error or success path.
Found by coverity. Fixes: CID#1237755
---
src/sysv-generator/sysv-generator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sysv-generator/sysv-generator.c
b/src/sysv-generator/sysv-generator.c
i
Second error path must free the (potentially) allocated memory in the
first code chunk before returning.
Found by coverity. Fixes: CID#1237750
---
src/core/manager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/core/manager.c b/src/core/manager.c
index 0770727..e0c1c
Coverity warned that we have already dereferenced ps->sample before
null-checking it. I suspect that's not really the issue and that
the check is checking the wrong variable.
Likely the oom-check should be on the just allocated ps->sample->next.
Found by coverity. Fixes: CID#1237765
---
src/bootc
Don't manually free 'n' in error path as it's already tagged
_cleanup_free_ and will be freed once it goes out of scope,
leading to double-free in this case.
Found with coverity. Fixes: CID#1237786
Signed-off-by: Andreas Henriksson
---
src/libsystemd-network/network-inte
On Sun, Jun 15, 2014 at 07:51:10AM +0400, Andrey Borzenkov wrote:
> В Fri, 13 Jun 2014 18:48:19 +0200
> Andreas Henriksson пишет:
>
[...]
> > +_cleanup_free_ char *s = NULL;
> >
> > get_process_comm(pid, &s);
&g
ut-directly-after in the code now.)
Regards,
Andreas Henriksson
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
here any static code analyzers that can catch these errors that can
be used to avoid relying on manual reviews catching these errors?
Any other ideas?
Have a great weekend!
Regards,
Andreas Henriksson
Andreas Henriksson (4):
install: fix invalid free() in unit_file_mask()
core: fix invalid
h(...)).
Signed-off-by: Andreas Henriksson
---
src/shared/install.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/install.c b/src/shared/install.c
index 487d0f6..f562063 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -563,7 +563,7 @
to nothing else initializing it before
the scope it is in finishes.
Signed-off-by: Andreas Henriksson
---
src/core/killall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/killall.c b/src/core/killall.c
index 57ed41c..eab48f7 100644
--- a/src/core/killall.c
+++
t; being initialized.
Signed-off-by: Andreas Henriksson
---
src/libsystemd-network/sd-dhcp-client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsystemd-network/sd-dhcp-client.c
b/src/libsystemd-network/sd-dhcp-client.c
index 8f54906..2a46624 100644
--- a/src/libsys
static bool enable_name_policy(...) in ./src/udev/net/link-config.c
calls proc_cmdline(...) to get "line" initialized, but
proc_cmdline(...) does not guarantee that atleast when both
conditions (detect_container(NULL) > 0) and
read_full_file(...) returned < 0.
Signed-off-by: An
13 matches
Mail list logo