Commit 230a7a7
libsubcmd: Fix parse-options memory leak
If a usage string is built in parse_options_subcommand, also free it.
Fixes: 901421a ("perf tools: Remove subcmd dependencies on strbuf")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240509052015.1914670-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent 5ecab78 commit 230a7a7
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| 636 | + | |
636 | 637 | | |
637 | 638 | | |
638 | 639 | | |
639 | | - | |
640 | | - | |
641 | 640 | | |
642 | 641 | | |
643 | 642 | | |
| |||
679 | 678 | | |
680 | 679 | | |
681 | 680 | | |
682 | | - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
683 | 685 | | |
684 | 686 | | |
685 | 687 | | |
| |||
0 commit comments