linux-uconsole/tools/lib/traceevent
Steven Rostedt (VMware) 140acbb093 tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure
[ Upstream commit e0d2615856b2046c2e8d5bfd6933f37f69703b0b ]

If the re-allocation of tep->cmdlines succeeds, then the previous
allocation of tep->cmdlines will be freed. If we later fail in
add_new_comm(), we must not free cmdlines, and also should assign
tep->cmdlines to the new allocation. Otherwise when freeing tep, the
tep->cmdlines will be pointing to garbage.

Fixes: a6d2a61ac6 ("tools lib traceevent: Remove some die() calls")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: linux-trace-devel@vger.kernel.org
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20190828191819.970121417@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-10-11 18:21:27 +02:00
..
.gitignore tools lib traceevent: Ignore generated library files 2016-08-02 12:16:13 -03:00
Build tools lib traceevent: Use tools build framework 2015-02-12 17:55:38 -03:00
event-parse.c tools lib traceevent: Do not free tep->cmdlines in add_new_comm() on failure 2019-10-11 18:21:27 +02:00
event-parse.h tools lib traceevent: Rename various pevent APIs 2018-08-13 15:36:43 -03:00
event-plugin.c libtraceevent: Change users plugin directory 2019-10-05 13:09:53 +02:00
event-utils.h tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
kbuffer-parse.c tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
kbuffer.h tools lib traceevent: Add way to find sub buffer boundary 2015-03-24 12:22:09 -03:00
Makefile tools lib traceevent: Fix "robust" test of do_generate_dynamic_list_file 2019-10-11 18:20:51 +02:00
parse-filter.c tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
parse-utils.c tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00
plugin_cfg80211.c tools lib traceevent: Rename pevent_register / unregister APIs 2018-08-13 15:27:35 -03:00
plugin_function.c tools lib traceevent: Rename pevent_find_* APIs 2018-08-13 15:31:28 -03:00
plugin_hrtimer.c tools lib traceevent: Rename pevent_register / unregister APIs 2018-08-13 15:27:35 -03:00
plugin_jbd2.c tools lib traceevent: Rename pevent_register / unregister APIs 2018-08-13 15:27:35 -03:00
plugin_kmem.c tools lib traceevent: Rename pevent_find_* APIs 2018-08-13 15:31:28 -03:00
plugin_kvm.c tools lib traceevent: Rename various pevent get/set/is APIs 2018-08-13 15:35:02 -03:00
plugin_mac80211.c tools lib traceevent: Rename pevent_register / unregister APIs 2018-08-13 15:27:35 -03:00
plugin_sched_switch.c tools lib traceevent: Rename pevent field APIs 2018-08-13 15:30:30 -03:00
plugin_scsi.c tools lib traceevent: Rename pevent_register / unregister APIs 2018-08-13 15:27:35 -03:00
plugin_xen.c tools lib traceevent: Rename pevent_register / unregister APIs 2018-08-13 15:27:35 -03:00
trace-seq.c tools lib traceevent: Change to SPDX License format 2018-08-20 08:54:58 -03:00