networkd: fix memleak when the same NetDev is specified twice

hashmap_put() returns 0 if the (key, value) pair is already present in the
hashmap, and -EEXIST if the key exists, but the value is different.

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13433
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-02-27 14:31:28 +01:00
parent 3772cfde03
commit 83ec459276
2 changed files with 7 additions and 6 deletions
Binary file not shown.