Zheng Zengkai
9f7b591e0b
perf record: Fix memory leak when using '--user-regs=?' to list registers
...
[ Upstream commit 2eb5dd418034ecea2f7031e3d33f2991a878b148 ]
When using 'perf record's option '-I' or '--user-regs=' along with
argument '?' to list available register names, memory of variable 'os'
allocated by strdup() needs to be released before __parse_regs()
returns, otherwise memory leak will occur.
Fixes: bcc84ec65ad1 ("perf record: Add ability to name registers to record")
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Li Bin <huawei.libin@huawei.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20200703093344.189450-1-zhengzengkai@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-29 13:45:01 +01:00
..
2016-09-01 12:41:09 -03:00
2019-05-25 18:26:50 +02:00
2016-06-23 10:30:31 -03:00
2017-07-15 12:16:14 +02:00
2016-07-12 15:19:58 -03:00
2020-07-31 16:44:07 +02:00
2016-09-20 12:28:29 -03:00
2019-03-23 13:19:53 +01:00
2019-03-23 13:19:53 +01:00
2016-09-08 13:44:03 -03:00
2016-09-08 13:44:03 -03:00
2016-08-23 17:06:39 -03:00
2016-07-13 23:09:03 -03:00
2015-11-18 17:51:04 -03:00
2015-11-18 17:51:04 -03:00
2017-01-26 08:24:36 +01:00
2019-04-20 09:07:48 +02:00
2016-07-13 23:09:08 -03:00
2016-07-12 15:19:58 -03:00
2016-05-06 13:00:43 -03:00
2016-05-06 13:00:43 -03:00
2017-03-12 06:41:47 +01:00
2017-03-12 06:41:47 +01:00
2020-07-31 16:44:07 +02:00
2016-03-23 15:06:35 -03:00
2016-07-12 15:20:34 -03:00
2016-03-23 15:06:35 -03:00
2016-07-12 15:20:24 -03:00
2019-04-20 09:07:48 +02:00
2016-06-23 17:20:04 -03:00
2019-03-13 14:04:55 -07:00
2016-07-18 19:42:47 -03:00
2016-09-22 12:19:40 -03:00
2016-02-24 20:21:12 -03:00
2019-06-22 08:17:23 +02:00
2016-06-28 10:54:55 -03:00
2016-06-28 10:54:56 -03:00
2016-07-12 15:19:47 -03:00
2016-04-14 08:57:54 -03:00
2016-05-30 12:41:43 -03:00
2016-05-06 13:00:53 -03:00
2016-08-23 15:37:33 -03:00
2016-07-12 15:19:47 -03:00
2016-02-05 09:46:45 -03:00
2016-02-05 09:46:45 -03:00
2016-07-12 16:12:38 -03:00
2016-07-12 16:12:38 -03:00
2016-09-22 12:19:41 -03:00
2016-09-22 12:19:41 -03:00
2020-06-20 10:24:22 +02:00
2020-06-20 10:24:22 +02:00
2020-12-02 08:31:28 +01:00
2020-01-04 13:40:28 +01:00
2016-09-01 12:41:09 -03:00
2016-07-04 19:39:01 -03:00
2016-07-04 19:39:01 -03:00
2020-12-02 08:31:24 +01:00
2016-07-25 11:58:56 -03:00
2016-10-03 11:24:13 -03:00
2016-07-15 17:27:50 -03:00
2016-09-29 11:17:00 -03:00
2019-08-04 09:33:20 +02:00
2016-09-29 11:16:59 -03:00
2016-02-05 12:33:09 -03:00
2017-01-26 08:24:36 +01:00
2017-01-26 08:24:36 +01:00
2016-01-08 12:46:17 -03:00
2016-06-06 17:04:15 -03:00
2019-10-17 13:42:15 -07:00
2016-10-03 19:58:00 -03:00
2016-07-12 15:20:24 -03:00
2015-12-14 12:30:37 -03:00
2019-11-12 19:15:43 +01:00
2020-01-23 08:19:40 +01:00
2016-09-05 11:14:50 -03:00
2020-10-29 09:05:38 +01:00
2016-09-29 11:17:05 -03:00
2016-06-23 11:39:19 -03:00
2016-03-23 15:06:35 -03:00
2019-10-17 13:42:43 -07:00
2016-04-01 18:42:55 -03:00
2016-01-29 17:49:54 -03:00
2016-07-12 15:19:58 -03:00
2019-10-17 13:42:42 -07:00
2016-06-21 13:18:34 -03:00
2016-08-24 11:20:58 -03:00
2019-08-25 10:51:21 +02:00
2019-08-25 10:51:21 +02:00
2020-04-02 17:20:41 +02:00
2016-09-05 11:14:50 -03:00
2016-06-15 10:35:27 -03:00
2016-06-15 10:35:27 -03:00
2018-03-22 09:17:51 +01:00
2016-04-14 08:57:54 -03:00
2015-12-17 14:27:14 -03:00
2020-07-31 16:44:07 +02:00
2016-10-03 21:35:47 -03:00
2016-10-17 11:24:18 -03:00
2018-08-03 07:55:13 +02:00
2020-12-29 13:45:01 +01:00
2015-08-31 18:01:33 -03:00
2016-07-12 15:19:58 -03:00
2016-05-11 21:54:06 +10:00
2020-01-04 13:41:02 +01:00
2020-09-23 08:46:15 +02:00
2020-09-23 08:46:15 +02:00
2020-07-31 16:44:07 +02:00
2016-09-01 12:42:25 -03:00
2019-02-12 19:44:55 +01:00
2016-08-23 17:03:31 -03:00
2020-08-26 10:29:03 +02:00
2017-07-05 14:40:27 +02:00
2016-07-27 17:16:43 -03:00
2016-07-18 19:49:47 -03:00
2016-07-12 15:19:55 -03:00
2016-07-12 15:19:55 -03:00
2016-06-23 11:35:07 -03:00
2016-06-23 11:26:15 -03:00
2020-11-18 18:26:23 +01:00
2016-04-13 10:11:52 -03:00
2016-02-29 11:18:25 -03:00
2020-10-01 20:40:14 +02:00
2016-09-22 13:08:57 -03:00
2020-07-31 16:44:07 +02:00
2016-06-06 17:04:16 -03:00
2020-07-22 09:10:51 +02:00
2019-10-17 13:42:17 -07:00
2020-01-04 13:41:05 +01:00
2016-10-03 11:24:13 -03:00
2017-07-15 12:16:12 +02:00
2017-07-15 12:16:12 +02:00
2016-01-12 12:42:07 -03:00
2016-06-23 11:35:01 -03:00
2019-01-26 09:38:34 +01:00
2016-03-23 15:06:35 -03:00
2016-04-14 19:46:53 -03:00
2020-10-01 20:40:14 +02:00
2016-09-05 11:14:50 -03:00
2020-06-20 10:24:22 +02:00
2019-08-25 10:51:20 +02:00
2016-04-08 09:58:14 -03:00
2016-04-08 09:58:14 -03:00
2016-07-29 11:54:35 -03:00
2015-12-09 13:42:02 -03:00
2015-12-09 13:42:02 -03:00
2017-07-15 12:16:13 +02:00
2016-04-13 10:11:51 -03:00
2016-06-23 17:04:26 -03:00
2016-06-23 17:04:26 -03:00
2019-08-25 10:51:20 +02:00
2016-06-07 12:08:52 -03:00
2016-03-31 10:52:24 -03:00
2016-05-20 11:43:55 -03:00
2018-11-13 11:16:49 -08:00
2015-12-11 11:52:24 -08:00
2018-11-13 11:16:49 -08:00
2017-01-26 08:24:36 +01:00
2016-07-12 16:14:52 -03:00
2016-07-12 16:14:52 -03:00
2018-03-18 11:18:50 +01:00
2016-03-08 10:11:18 +01:00
2016-04-01 18:42:55 -03:00
2019-02-20 10:18:30 +01:00
2015-11-23 18:31:13 -03:00
2018-04-13 19:48:05 +02:00
2016-07-04 20:27:12 -03:00
2016-07-04 20:27:12 -03:00
2016-03-23 12:32:31 -03:00
2018-04-13 19:48:31 +02:00
2019-05-31 06:48:13 -07:00
2016-06-23 10:25:58 -03:00