Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111878
b: refs/heads/master
c: 152cbcf
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Sep 24, 2008
1 parent 68b4de9 commit 7d6a91d
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: fa53ebac42d3de04619c813f5f6628ca2a7ce97f
refs/heads/master: 152cbcf94baec68b45832db5024184906ab798b1
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 7d6a91d

Please sign in to comment.