Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111803
b: refs/heads/master
c: 96ca4a2
h: refs/heads/master
i:
  111801: 2bd1319
  111799: f6ea963
v: v3
  • Loading branch information
Oliver Hartkopp authored and David S. Miller committed Sep 24, 2008
1 parent 7513eeb commit e378a8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d87798450a7635ab1bcc80271a13ce4a53b016a9
refs/heads/master: 96ca4a2cc1454cf633a1e0796b7ef39d937b87ec
8 changes: 8 additions & 0 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,14 @@ int dev_set_alias(struct net_device *dev, const char *alias, size_t len)
if (len >= IFALIASZ)
return -EINVAL;

if (!len) {
if (dev->ifalias) {
kfree(dev->ifalias);
dev->ifalias = NULL;
}
return 0;
}

dev->ifalias = krealloc(dev->ifalias, len+1, GFP_KERNEL);
if (!dev->ifalias)
return -ENOMEM;
Expand Down

0 comments on commit e378a8e

Please sign in to comment.