Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321577
b: refs/heads/master
c: 7364e44
h: refs/heads/master
i:
  321575: 4604d58
v: v3
  • Loading branch information
Alexey Khoroshilov authored and David S. Miller committed Aug 8, 2012
1 parent b4f90bc commit 4e8d841
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47dffc7547ed3b105dabd570ed864347687beac2
refs/heads/master: 7364e445f62825758fa61195d237a5b8ecdd06ec
7 changes: 5 additions & 2 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,8 @@ int dev_change_name(struct net_device *dev, const char *newname)
*/
int dev_set_alias(struct net_device *dev, const char *alias, size_t len)
{
char *new_ifalias;

ASSERT_RTNL();

if (len >= IFALIASZ)
Expand All @@ -1068,9 +1070,10 @@ int dev_set_alias(struct net_device *dev, const char *alias, size_t len)
return 0;
}

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

strlcpy(dev->ifalias, alias, len+1);
return len;
Expand Down

0 comments on commit 4e8d841

Please sign in to comment.