diff options
author | Tom Gundersen <teg@jklm.no> | 2014-02-18 21:42:05 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-02-18 22:34:26 +0100 |
commit | 11a7f22939d21558df919cab44b8fbe36ab5dae0 (patch) | |
tree | ca9d1173cd160446c1b761d807fea4972cc87b87 /src/network/networkd.h | |
parent | 3302da4667640ac130956d8d90be7c39fb39222f (diff) |
networkd: refactor link_add() :(
Don't set set **ret when returning r < 0, as matching on the errno may easily
give false positives in the future leading to null pointer dereference.
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index 51d77570d4..5a1bf1a4ca 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -313,6 +313,7 @@ int config_parse_label(const char *unit, const char *filename, unsigned line, int link_new(Manager *manager, struct udev_device *device, Link **ret); void link_free(Link *link); +int link_get(Manager *m, int ifindex, Link **ret); int link_add(Manager *manager, struct udev_device *device, Link **ret); int link_configure(Link *link); |