]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: address config add error checking 5421/head
authorSusant Sahani <susant@redhat.com>
Wed, 22 Feb 2017 05:41:28 +0000 (11:11 +0530)
committerSusant Sahani <susant@redhat.com>
Wed, 22 Feb 2017 05:41:28 +0000 (11:11 +0530)
We not looking for hashmap_put return error code.

src/network/networkd-address.c

index e872b36009edffa01b47009c8e20c0a1d5242787..e34793e50bfa3e0b42e08f7a9e44c1ae2dc083c4 100644 (file)
@@ -87,7 +87,9 @@ int address_new_static(Network *network, const char *filename, unsigned section_
                 address->section = n;
                 n = NULL;
 
-                hashmap_put(network->addresses_by_section, address->section, address);
+                r = hashmap_put(network->addresses_by_section, address->section, address);
+                if (r < 0)
+                        return r;
         }
 
         address->network = network;