[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170817170931.24435-5-phil@nwl.cc>
Date: Thu, 17 Aug 2017 19:09:30 +0200
From: Phil Sutter <phil@....cc>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org
Subject: [iproute PATCH v2 4/5] ss: Fix potential memleak in unix_stats_print()
Fixes: 2d0e538f3e1cd ("ss: Drop list traversal from unix_stats_print()")
Signed-off-by: Phil Sutter <phil@....cc>
---
misc/ss.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/misc/ss.c b/misc/ss.c
index 07eecfa7a36db..34c6da5443642 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -3169,8 +3169,10 @@ static int unix_show(struct filter *f)
if (name[0]) {
u->name = strdup(name);
- if (!u->name)
+ if (!u->name) {
+ free(u);
break;
+ }
}
if (u->rport) {
--
2.13.1
Powered by blists - more mailing lists