projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
system-linux: fix memory leak on error in system_add_vxlan()
[project/netifd.git]
/
system-linux.c
diff --git
a/system-linux.c
b/system-linux.c
index
0ca5256
..
6fb0a01
100644
(file)
--- a/
system-linux.c
+++ b/
system-linux.c
@@
-2824,8
+2824,10
@@
static int system_add_vxlan(const char *name, const unsigned int link, struct bl
unsigned tos = 1;
if (strcmp(str, "inherit")) {
- if (!system_tos_aton(str, &tos))
- return -EINVAL;
+ if (!system_tos_aton(str, &tos)) {
+ ret = -EINVAL;
+ goto failure;
+ }
}
nla_put_u8(msg, IFLA_VXLAN_TOS, tos);