Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349992
b: refs/heads/master
c: 8d9233f
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 25, 2013
1 parent 687b85c commit a6a8337
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e16017d497e9bb37c8c3c5ed1edb8d6adeebf3a
refs/heads/master: 8d9233f205e8855dc762665e28012354cd46af45
6 changes: 3 additions & 3 deletions trunk/tools/perf/builtin-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "util/debug.h"

#include <linux/rbtree.h>
#include <linux/string.h>

struct alloc_stat;
typedef int (*sort_fn_t)(struct alloc_stat *, struct alloc_stat *);
Expand Down Expand Up @@ -618,12 +619,11 @@ static int sort_dimension__add(const char *tok, struct list_head *list)

for (i = 0; i < NUM_AVAIL_SORTS; i++) {
if (!strcmp(avail_sorts[i]->name, tok)) {
sort = malloc(sizeof(*sort));
sort = memdup(avail_sorts[i], sizeof(*avail_sorts[i]));
if (!sort) {
pr_err("%s: malloc failed\n", __func__);
pr_err("%s: memdup failed\n", __func__);
return -1;
}
memcpy(sort, avail_sorts[i], sizeof(*sort));
list_add_tail(&sort->list, list);
return 0;
}
Expand Down

0 comments on commit a6a8337

Please sign in to comment.