From 687b85c600e0297e99a5129414c5b9a53ef7a2b2 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 24 Jan 2013 22:16:43 -0300 Subject: [PATCH] --- yaml --- r: 349991 b: refs/heads/master c: 8e16017d497e9bb37c8c3c5ed1edb8d6adeebf3a h: refs/heads/master i: 349989: 9353965c4a6cba429daf92c021c5c25e525f7983 349987: f17d6a398f6d4aba2adcdcf3188653f7bf0ce53d 349983: d027d1e5d54078fe46ab7d244f127860b7780f8d v: v3 --- [refs] | 2 +- trunk/tools/perf/util/map.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 5499103d7d36..37f372b66ba7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 237a7e04a1a4461843a998fae78517dbbd08602e +refs/heads/master: 8e16017d497e9bb37c8c3c5ed1edb8d6adeebf3a diff --git a/trunk/tools/perf/util/map.c b/trunk/tools/perf/util/map.c index b6b163642c7d..6fcb9de62340 100644 --- a/trunk/tools/perf/util/map.c +++ b/trunk/tools/perf/util/map.c @@ -11,6 +11,7 @@ #include "strlist.h" #include "vdso.h" #include "build-id.h" +#include const char *map_type__name[MAP__NR_TYPES] = { [MAP__FUNCTION] = "Functions", @@ -213,12 +214,7 @@ struct symbol *map__find_symbol_by_name(struct map *map, const char *name, struct map *map__clone(struct map *map) { - struct map *clone = malloc(sizeof(*clone)); - - if (clone != NULL) - memcpy(clone, map, sizeof(*clone)); - - return clone; + return memdup(map, sizeof(*map)); } int map__overlap(struct map *l, struct map *r)