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

Tom Gundersen tomegun at kemper.freedesktop.org
Tue Jun 17 14:23:27 PDT 2014


 src/libsystemd-network/network-internal.c |    9 ++++-----
 src/network/networkd-netdev.c             |    9 +++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5a1045a55689232443d86783b1423a2b4bdf1683
Author: Tom Gundersen <teg at jklm.no>
Date:   Tue Jun 17 19:42:30 2014 +0200

    networkd: veth - fix parsing verification

diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index bf82047..016daf3 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -692,8 +692,8 @@ static int netdev_load_one(Manager *manager, const char *filename) {
         LIST_HEAD_INIT(netdev->callbacks);
 
         if(netdev->kind == NETDEV_KIND_VETH) {
-                if (netdev->ifname_peer) {
-                        log_warning("Veth NetDev without Peer Name configured "
+                if (!netdev->ifname_peer) {
+                        log_warning("Veth NetDev without peer name configured "
                                     "in %s. Ignoring", filename);
                         return 0;
                 }

commit ee6b50892ea1fec81e10372c1c7c7606f5b2a25d
Author: Tom Gundersen <teg at jklm.no>
Date:   Tue Jun 17 19:40:40 2014 +0200

    networkd: vxlan - fix parsing verification

diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 8879e08..bf82047 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -653,8 +653,8 @@ static int netdev_load_one(Manager *manager, const char *filename) {
                 return 0;
         }
 
-        if (netdev->kind != NETDEV_KIND_VXLAN && netdev->vlanid <= VXLAN_VID_MAX) {
-                log_warning("VLAN Id configured for a %s in %s. Ignoring",
+        if (netdev->kind != NETDEV_KIND_VXLAN && netdev->vxlanid <= VXLAN_VID_MAX) {
+                log_warning("VXLAN Id configured for a %s in %s. Ignoring",
                             netdev_kind_to_string(netdev->kind), filename);
                 return 0;
         }

commit 5a3f198964dbc6fcf9157f1673689698ae89a3bf
Author: Tom Gundersen <teg at jklm.no>
Date:   Tue Jun 17 19:40:12 2014 +0200

    networkd: veth - fix memleak

diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index e9146d0..2e9667c 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -179,7 +179,7 @@ int config_parse_ifname(const char *unit,
                         void *userdata) {
 
         char **s = data;
-        char *n;
+        _cleanup_free_ char *n = NULL;
 
         assert(filename);
         assert(lvalue);
@@ -198,12 +198,11 @@ int config_parse_ifname(const char *unit,
         }
 
         free(*s);
-        if (*n)
+        if (*n) {
                 *s = n;
-        else {
-                free(n);
+                n = NULL;
+        } else
                 *s = NULL;
-        }
 
         return 0;
 }
diff --git a/src/network/networkd-netdev.c b/src/network/networkd-netdev.c
index 5359eb1..8879e08 100644
--- a/src/network/networkd-netdev.c
+++ b/src/network/networkd-netdev.c
@@ -94,6 +94,7 @@ static void netdev_free(NetDev *netdev) {
 
         free(netdev->description);
         free(netdev->ifname);
+        free(netdev->ifname_peer);
         free(netdev->mac);
         free(netdev->mac_peer);
 



More information about the systemd-commits mailing list