[tip:perf/core] perf tools: Initialize dso->node member in dso__new

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  0ab061cd523a7f2dbf1b59aab0542cb0ab2e4633
Gitweb:     http://git.kernel.org/tip/0ab061cd523a7f2dbf1b59aab0542cb0ab2e4633
Author:     Masami Hiramatsu <mhiramat@xxxxxxxxxx>
AuthorDate: Wed, 21 Apr 2010 15:56:16 -0400
Committer:  Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitDate: Mon, 26 Apr 2010 15:31:32 -0300

perf tools: Initialize dso->node member in dso__new

If dso->node member is not initialized, it causes a segmentation fault when
adding to other lists.

It should be initilized in dso__new().

Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
LKML-Reference: : <20100421195616.24664.89980.stgit@xxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
 tools/perf/util/symbol.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index e782e7d..e77c33a 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -189,6 +189,7 @@ struct dso *dso__new(const char *name)
 		self->sorted_by_name = 0;
 		self->has_build_id = 0;
 		self->kernel = DSO_TYPE_USER;
+		INIT_LIST_HEAD(&self->node);
 	}
 
 	return self;
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux