Commit e649fb7
perf sched: Fix memory leak in perf_sched__map()
[ Upstream commit ef76a5a ]
perf_sched__map() needs to free memory of map_cpus, color_pids and
color_cpus in normal path and rollback allocated memory in error path.
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240206083228.172607-3-yangjihong1@huawei.com
Stable-dep-of: 1a5efc9 ("libsubcmd: Don't free the usage string")
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 85ca3d4 commit e649fb7
1 file changed
Lines changed: 26 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3252 | 3252 | | |
3253 | 3253 | | |
3254 | 3254 | | |
3255 | | - | |
3256 | | - | |
3257 | 3255 | | |
3258 | 3256 | | |
3259 | 3257 | | |
| |||
3262 | 3260 | | |
3263 | 3261 | | |
3264 | 3262 | | |
3265 | | - | |
3266 | | - | |
3267 | | - | |
3268 | | - | |
3269 | | - | |
3270 | | - | |
3271 | | - | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
| 3266 | + | |
| 3267 | + | |
| 3268 | + | |
| 3269 | + | |
3272 | 3270 | | |
3273 | 3271 | | |
3274 | | - | |
3275 | 3272 | | |
3276 | 3273 | | |
3277 | 3274 | | |
| |||
3311 | 3308 | | |
3312 | 3309 | | |
3313 | 3310 | | |
| 3311 | + | |
| 3312 | + | |
3314 | 3313 | | |
3315 | | - | |
| 3314 | + | |
3316 | 3315 | | |
3317 | 3316 | | |
3318 | | - | |
| 3317 | + | |
3319 | 3318 | | |
3320 | 3319 | | |
3321 | | - | |
| 3320 | + | |
3322 | 3321 | | |
3323 | 3322 | | |
3324 | 3323 | | |
3325 | | - | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
3326 | 3327 | | |
3327 | | - | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
3328 | 3339 | | |
3329 | 3340 | | |
3330 | 3341 | | |
| |||
0 commit comments