@@ -419,7 +419,8 @@ static struct map *find_map(unw_word_t ip, struct unwind_info *ui)
419
419
struct map * ret ;
420
420
421
421
addr_location__init (& al );
422
- ret = thread__find_map (ui -> thread , PERF_RECORD_MISC_USER , ip , & al );
422
+ thread__find_map (ui -> thread , PERF_RECORD_MISC_USER , ip , & al );
423
+ ret = map__get (al .map );
423
424
addr_location__exit (& al );
424
425
return ret ;
425
426
}
@@ -440,8 +441,10 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
440
441
return - EINVAL ;
441
442
442
443
dso = map__dso (map );
443
- if (!dso )
444
+ if (!dso ) {
445
+ map__put (map );
444
446
return - EINVAL ;
447
+ }
445
448
446
449
pr_debug ("unwind: find_proc_info dso %s\n" , dso -> name );
447
450
@@ -476,11 +479,11 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
476
479
477
480
memset (& di , 0 , sizeof (di ));
478
481
if (dwarf_find_debug_frame (0 , & di , ip , base , symfile , start , map__end (map )))
479
- return dwarf_search_unwind_table (as , ip , & di , pi ,
480
- need_unwind_info , arg );
482
+ ret = dwarf_search_unwind_table (as , ip , & di , pi ,
483
+ need_unwind_info , arg );
481
484
}
482
485
#endif
483
-
486
+ map__put ( map );
484
487
return ret ;
485
488
}
486
489
@@ -534,12 +537,14 @@ static int access_dso_mem(struct unwind_info *ui, unw_word_t addr,
534
537
535
538
dso = map__dso (map );
536
539
537
- if (!dso )
540
+ if (!dso ) {
541
+ map__put (map );
538
542
return -1 ;
543
+ }
539
544
540
545
size = dso__data_read_addr (dso , map , ui -> machine ,
541
546
addr , (u8 * ) data , sizeof (* data ));
542
-
547
+ map__put ( map );
543
548
return !(size == sizeof (* data ));
544
549
}
545
550
0 commit comments