diff options
Diffstat (limited to 'tools/perf/util/wrapper.c')
-rw-r--r-- | tools/perf/util/wrapper.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tools/perf/util/wrapper.c b/tools/perf/util/wrapper.c index 19f15b650703..5f1a07c4b87b 100644 --- a/tools/perf/util/wrapper.c +++ b/tools/perf/util/wrapper.c | |||
@@ -12,18 +12,6 @@ static inline void release_pack_memory(size_t size __maybe_unused, | |||
12 | { | 12 | { |
13 | } | 13 | } |
14 | 14 | ||
15 | char *xstrdup(const char *str) | ||
16 | { | ||
17 | char *ret = strdup(str); | ||
18 | if (!ret) { | ||
19 | release_pack_memory(strlen(str) + 1, -1); | ||
20 | ret = strdup(str); | ||
21 | if (!ret) | ||
22 | die("Out of memory, strdup failed"); | ||
23 | } | ||
24 | return ret; | ||
25 | } | ||
26 | |||
27 | void *xrealloc(void *ptr, size_t size) | 15 | void *xrealloc(void *ptr, size_t size) |
28 | { | 16 | { |
29 | void *ret = realloc(ptr, size); | 17 | void *ret = realloc(ptr, size); |