diff options
Diffstat (limited to 'src/shared/netif-util.c')
-rw-r--r-- | src/shared/netif-util.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c index f56c5646c1..c9a14b4739 100644 --- a/src/shared/netif-util.c +++ b/src/shared/netif-util.c @@ -32,14 +32,8 @@ int net_get_type_string(sd_device *device, uint16_t iftype, char **ret) { if (device && sd_device_get_devtype(device, &t) >= 0 && - !isempty(t)) { - p = strdup(t); - if (!p) - return -ENOMEM; - - *ret = p; - return 0; - } + !isempty(t)) + return strdup_to(ret, t); t = arphrd_to_name(iftype); if (!t) |