Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-10 14:13:58 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-16 08:28:02 +0200
commit51e6ea94963cd8a142ff79e0c7af1e8ca79e666f (patch)
tree6f7d5a3618cb6ccc6710c51861778d0016b98486
parent2fe1991ebc2d250afc1d032802e2698db7473254 (diff)
genetlink: Fix a memory leak on error path
(networking-stable-19_03_28). suse-commit: 03c8e1b6ca7c0089950b3e1bcd71c9e817493c1b
-rw-r--r--net/netlink/genetlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 680aebb87888..792775ace93e 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -364,7 +364,7 @@ int genl_register_family(struct genl_family *family)
start, end + 1, GFP_KERNEL);
if (family->id < 0) {
err = family->id;
- goto errout_locked;
+ goto errout_free;
}
err = genl_validate_assign_mc_groups(family);
@@ -383,6 +383,7 @@ int genl_register_family(struct genl_family *family)
errout_remove:
idr_remove(&genl_fam_idr, family->id);
+errout_free:
kfree(family->attrbuf);
errout_locked:
genl_unlock_all();