From: Matthias Tafelmeier <matthias.tafelmeier@gmx.net>
To: netdev@vger.kernel.org
Cc: hagen@jauu.net, shemminger@osdl.org, fw@strlen.de,
edumazet@google.com, daniel@iogearbox.net
Subject: [PATCH 10/10] ss: fixed free on local array for valid json output
Date: Mon, 10 Aug 2015 01:13:26 +0200 [thread overview]
Message-ID: <1439162006-11421-11-git-send-email-matthias.tafelmeier@gmx.net> (raw)
In-Reply-To: <1439162006-11421-1-git-send-email-matthias.tafelmeier@gmx.net>
Minor fix to enable json output. Freeing of automatic char array name
which will get freed after function stack cleanup. Another one after
tcp_stats_fmt for freeing automatic tcpstats struct instance.
Signed-off-by: Matthias Tafelmeier <matthias.tafelmeier@gmx.net>
Suggested-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
misc/ss.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index 24f08d0..dc6e3f1 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1665,10 +1665,6 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
s.segs_out = info->tcpi_segs_out;
s.segs_in = info->tcpi_segs_in;
tcp_stats_fmt(&s);
- if (s.dctcp)
- free(s.dctcp);
- if (s.cong_alg)
- free(s.cong_alg);
}
}
@@ -2367,8 +2363,6 @@ if (show_mem) {
printf("}\n");
}
- if (name)
- free(name);
return 0;
}
--
1.9.1
next prev parent reply other threads:[~2015-08-09 23:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-09 23:13 full ss json support and general output simplification Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 01/10] ss: rooted out ss type declarations for output formatters Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 02/10] ss: created formatters for json and hr Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 03/10] ss: removed obsolet fmt functions Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 04/10] ss: prepare timer for output handler usage Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 05/10] ss: framed skeleton for json output in ss Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 06/10] ss: replaced old output mechanisms with fmt handlers interfaces Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 07/10] ss: renaming and export of current_filter Matthias Tafelmeier
2015-08-09 23:13 ` [PATCH 08/10] ss: symmetrical subhandler output extension example Matthias Tafelmeier
2015-08-10 12:19 ` Sergei Shtylyov
2015-08-10 14:53 ` Eric Dumazet
2015-08-10 17:06 ` Matthias Tafelmeier
2015-08-10 18:19 ` Sergei Shtylyov
2015-08-09 23:13 ` [PATCH 09/10] ss: symmetrical formatter " Matthias Tafelmeier
2015-08-09 23:13 ` Matthias Tafelmeier [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-08-10 18:52 V2 iproute2: full ss json support and general output simplification Matthias Tafelmeier
2015-08-10 18:52 ` [PATCH 10/10] ss: fixed free on local array for valid json output Matthias Tafelmeier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439162006-11421-11-git-send-email-matthias.tafelmeier@gmx.net \
--to=matthias.tafelmeier@gmx.net \
--cc=daniel@iogearbox.net \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=hagen@jauu.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).