Private variable perf_counters needs to be initialized before use. Otherwise, perf_counter_init() call will cause crashes.
Signed-off-by: Andy Zhou <[email protected]> --- lib/perf-counter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/perf-counter.c b/lib/perf-counter.c index 8c859cc..62e2d76 100644 --- a/lib/perf-counter.c +++ b/lib/perf-counter.c @@ -31,7 +31,7 @@ #include "shash.h" #include "util.h" -static struct shash perf_counters; +static struct shash perf_counters = SHASH_INITIALIZER(&perf_counters); static int fd__ = 0; uint64_t -- 1.9.1 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
