[systemd-commits] 4 commits - src/core src/libsystemd-network TODO
Thomas H.P. Andersen
phomes at kemper.freedesktop.org
Wed Jun 18 14:24:03 PDT 2014
TODO | 2 --
src/core/socket.c | 2 ++
src/libsystemd-network/sd-dhcp-client.c | 2 ++
src/libsystemd-network/sd-dhcp-server.c | 4 +++-
4 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit df9db010def086cefa1225d0ac071cba96d9a610
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Wed Jun 18 23:18:19 2014 +0200
TODO: update
diff --git a/TODO b/TODO
index db45ecb..7568418 100644
--- a/TODO
+++ b/TODO
@@ -58,8 +58,6 @@ Features:
* set NOTIFY_SOCKET also for control processes
-* drop parsing of chkconfig header lines from service.c
-
* mount_cgroup_controllers(): symlinks need to get the label applied
* For timer units: add some mechanisms so that timer units that trigger immediately on boot do not have the services
commit cee288adf88844acd880e4c0da5ed550c85cdd1a
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Wed Jun 18 20:34:52 2014 +0200
socket: check return from exec_spawn
diff --git a/src/core/socket.c b/src/core/socket.c
index 94eb2e7..c58a7f0 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1343,6 +1343,8 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
NULL,
s->exec_runtime,
&pid);
+ if (r < 0)
+ goto fail;
r = unit_watch_pid(UNIT(s), pid);
if (r < 0)
commit f7926298e934c91dc2d152f4223cafbd202c907c
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Wed Jun 18 20:26:54 2014 +0200
sd-dhcp-client: check return from dhcp_option_append
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 2a46624..c1af6df 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -398,6 +398,8 @@ static int client_send_discover(sd_dhcp_client *client) {
r = dhcp_option_append(&discover->dhcp, optlen, &optoffset, 0,
DHCP_OPTION_END, 0, NULL);
+ if (r < 0)
+ return r;
/* We currently ignore:
The client SHOULD wait a random time between one and ten seconds to
commit 02557f973aed0fed7154fefe53d67e2935f918dc
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date: Fri Jun 13 22:54:22 2014 +0200
sd-dhcp-server: fix a leak
We must use free instead of dhcp_lease_free here to avoid freeing
client_id.data.
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c
index 4ce1054..d949502 100644
--- a/src/libsystemd-network/sd-dhcp-server.c
+++ b/src/libsystemd-network/sd-dhcp-server.c
@@ -697,8 +697,10 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message,
lease->address = req->requested_ip;
lease->client_id.data = memdup(req->client_id.data,
req->client_id.length);
- if (!lease->client_id.data)
+ if (!lease->client_id.data) {
+ free(lease);
return -ENOMEM;
+ }
lease->client_id.length = req->client_id.length;
} else
lease = existing_lease;
More information about the systemd-commits
mailing list