[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] xentrace: free CPU mask string before overwriting pointer
commit c33e14abb1aea6769146346f6737288be838f906 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Jan 17 08:53:27 2025 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Jan 17 08:53:27 2025 +0100 xentrace: free CPU mask string before overwriting pointer While multiple -c options may be unexpected, we'd still better deal with them properly. Also restore the blank line that was bogusly zapped by the same commit. Coverity-ID: 1638723 Fixes: e4ad2836842a ("xentrace: Implement cpu mask range parsing of human values (-c)") Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Release-Acked-by: Oleksii Kurochko<oleksii.kurochko@xxxxxxxxx> --- tools/xentrace/xentrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/xentrace/xentrace.c b/tools/xentrace/xentrace.c index 63b29f8442..a5aa3c1903 100644 --- a/tools/xentrace/xentrace.c +++ b/tools/xentrace/xentrace.c @@ -1105,8 +1105,10 @@ static void parse_args(int argc, char **argv) break; case 'c': /* set new cpu mask for filtering (when xch is set). */ + free(opts.cpu_mask_str); opts.cpu_mask_str = strdup(optarg); break; + case 'e': /* set new event mask for filtering*/ parse_evtmask(optarg); break; -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |