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 v6 09/10] ss: fixed free on local array for valid json output
Date: Wed, 9 Sep 2015 21:43:20 +0200 [thread overview]
Message-ID: <1441827801-9617-10-git-send-email-matthias.tafelmeier@gmx.net> (raw)
In-Reply-To: <1441827801-9617-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>
---
misc/ss.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index 6ff40a3..80aebe6 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1660,10 +1660,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);
}
}
@@ -2362,8 +2358,6 @@ static int unix_show_sock(const struct sockaddr_nl *addr, struct nlmsghdr *nlh,
if (json_output)
jsonw_end_object(json_wr);
- if (name)
- free(name);
return 0;
}
--
1.9.1
next prev parent reply other threads:[~2015-09-09 19:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 19:43 iproute2 v6: full ss json support and general output simplification Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 01/10] ss: rooted out ss type declarations for output formatters Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 02/10] ss: created formatters for json and hr Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 03/10] ss: removed obsolet fmt functions Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 04/10] ss: prepare timer for output handler usage Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 05/10] ss: replaced old output with new generic output mechanisms Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 06/10] ss: renaming and export of current_filter Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 07/10] ss: symmetrical subhandler output extension example Matthias Tafelmeier
2015-09-09 19:43 ` [PATCH v6 08/10] ss: symmetrical formatter " Matthias Tafelmeier
2015-09-09 19:43 ` Matthias Tafelmeier [this message]
2015-09-09 19:43 ` [PATCH v6 10/10] ss: activate json_writer excluded logic Matthias Tafelmeier
[not found] ` <4b7ff1016053461a80465ce8138e12a2@HQ1WP-EXMB11.corp.brocade.com>
2015-09-09 21:30 ` [PATCH v6 02/10] ss: created formatters for json and hr Stephen Hemminger
2015-09-09 22:00 ` Matthias Tafelmeier
[not found] ` <cf829f8ac6ea466eb9bb693350dd3291@HQ1WP-EXMB11.corp.brocade.com>
2015-09-09 22:34 ` Stephen Hemminger
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=1441827801-9617-10-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).