projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b34ccd
)
perf-counter: initialize perf counter shash before use
author
Andy Zhou
<azhou@nicira.com>
Wed, 15 Jul 2015 20:22:00 +0000
(13:22 -0700)
committer
Andy Zhou
<azhou@nicira.com>
Fri, 17 Jul 2015 19:24:22 +0000
(12:24 -0700)
Private variable perf_counters needs to be initialized before
use. Otherwise, perf_counter_init() call will cause crashes.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/perf-counter.c
patch
|
blob
|
history
diff --git
a/lib/perf-counter.c
b/lib/perf-counter.c
index
8c859cc
..
62e2d76
100644
(file)
--- 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