perf maps: Add missing unlock to maps__insert() error case
`tools/perf/util/map.c` has a function named `maps__insert` that
acquires a write lock if its in multithread context.
Even though this lock is released when function successfully completes,
there's a branch that is executed when `maps_by_name == NULL` that
returns from this function without releasing the write lock.
Added an `up_write` to release the lock when this happens.
Fixes: a7c2b572e217 ("perf map_groups: Auto sort maps by name, if needed")
Signed-off-by: Cengiz Can <firstname.lastname@example.org>
Cc: Adrian Hunter <email@example.com>
Cc: Jiri Olsa <firstname.lastname@example.org>
Cc: Namhyung Kim <email@example.com>
Signed-off-by: Arnaldo Carvalho de Melo <firstname.lastname@example.org>
1 file changed