chiark / gitweb /
sd-dhcp6-client: fix free before use
[elogind.git] / src / libsystemd-network / test-icmp6-rs.c
index 86e02cccbeb705fe6110af5bf03a5d61f38a03d2..b81211f6bcb7a6b5ec4c34b8466953361f16ef2a 100644 (file)
@@ -127,6 +127,10 @@ static void test_rs(sd_event *e) {
                                  time_now + 2 *USEC_PER_SEC, 0,
                                  test_rs_hangcheck, NULL) >= 0);
 
+        assert(sd_icmp6_nd_stop(nd) >= 0);
+        assert(sd_icmp6_router_solicitation_start(nd) >= 0);
+        assert(sd_icmp6_nd_stop(nd) >= 0);
+
         assert(sd_icmp6_router_solicitation_start(nd) >= 0);
 
         sd_event_loop(e);
@@ -136,7 +140,6 @@ static void test_rs(sd_event *e) {
         nd = sd_icmp6_nd_unref(nd);
         assert(!nd);
 
-        close(test_fd[0]);
         close(test_fd[1]);
 }