[systemd-commits] 3 commits - src/libsystemd-network

Lennart Poettering lennart at kemper.freedesktop.org
Thu Jun 19 15:32:11 PDT 2014


 src/libsystemd-network/sd-dhcp6-client.c |    4 ++--
 src/libsystemd-network/sd-icmp6-nd.c     |    1 +
 src/libsystemd-network/test-icmp6-rs.c   |    1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f277be6768efeb52c0aa30680eef8425e6f97ba2
Author: Ronny Chevalier <chevalier.ronny at gmail.com>
Date:   Thu Jun 19 19:32:05 2014 +0200

    tests: fix test-icmp6-rs
    
    Don't close the fd given to sd-icmp6-nd, since it will be aynschonously closed
    by sd_icmp6_nd_unref

diff --git a/src/libsystemd-network/test-icmp6-rs.c b/src/libsystemd-network/test-icmp6-rs.c
index 86e02cc..cd5c476 100644
--- a/src/libsystemd-network/test-icmp6-rs.c
+++ b/src/libsystemd-network/test-icmp6-rs.c
@@ -136,7 +136,6 @@ static void test_rs(sd_event *e) {
         nd = sd_icmp6_nd_unref(nd);
         assert(!nd);
 
-        close(test_fd[0]);
         close(test_fd[1]);
 }
 

commit 03de7ed905ea95814b6a5008225d6fb708871e1f
Author: Ronny Chevalier <chevalier.ronny at gmail.com>
Date:   Thu Jun 19 19:32:29 2014 +0200

    sd-icmp6-nd: fix uninitialized fd

diff --git a/src/libsystemd-network/sd-icmp6-nd.c b/src/libsystemd-network/sd-icmp6-nd.c
index f820a9c..10c5e5e 100644
--- a/src/libsystemd-network/sd-icmp6-nd.c
+++ b/src/libsystemd-network/sd-icmp6-nd.c
@@ -171,6 +171,7 @@ int sd_icmp6_nd_new(sd_icmp6_nd **ret) {
         nd->n_ref = REFCNT_INIT;
 
         nd->index = -1;
+        nd->fd = -1;
 
         *ret = nd;
         nd = NULL;

commit 513a6fa8679510ea1b55967bdb482dd5f8a39f21
Author: Ronny Chevalier <chevalier.ronny at gmail.com>
Date:   Thu Jun 19 19:44:03 2014 +0200

    sd-dhcp6-client: fix uninitialized variables

diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c
index ef5fb44..97a2ba7 100644
--- a/src/libsystemd-network/sd-dhcp6-client.c
+++ b/src/libsystemd-network/sd-dhcp6-client.c
@@ -310,7 +310,7 @@ static int client_timeout_resend(sd_event_source *s, uint64_t usec,
         sd_dhcp6_client *client = userdata;
         usec_t time_now, init_retransmit_time, max_retransmit_time;
         usec_t max_retransmit_duration;
-        uint8_t max_retransmit_count;
+        uint8_t max_retransmit_count = 0;
         char time_string[FORMAT_TIMESPAN_MAX];
 
         assert(s);
@@ -434,7 +434,7 @@ static int client_ensure_iaid(sd_dhcp6_client *client) {
         if (detect_container(NULL) <= 0) {
                 /* not in a container, udev will be around */
                 _cleanup_udev_unref_ struct udev *udev;
-                _cleanup_udev_device_unref_ struct udev_device *device;
+                _cleanup_udev_device_unref_ struct udev_device *device = NULL;
                 char ifindex_str[2 + DECIMAL_STR_MAX(int)];
 
                 udev = udev_new();



More information about the systemd-commits mailing list