aboutsummaryrefslogtreecommitdiff
path: root/sbin/ddb/ddb_capture.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2009-11-02 20:18:50 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2009-11-02 20:18:50 +0000
commit5ef5fd6e5397eb7583f2b238bad50de0f97b8301 (patch)
treeef86eeed636872c29ff4782cfa0ff62344e5bb86 /sbin/ddb/ddb_capture.c
parent060ed74b533653b09e4718d407b0dc2449637756 (diff)
downloadsrc-5ef5fd6e5397eb7583f2b238bad50de0f97b8301.tar.gz
src-5ef5fd6e5397eb7583f2b238bad50de0f97b8301.zip
Ensure 'kvm' is always initialized. If "-M" was not specified and the
garbage value on the stack was not zero, then 'ddb capture' would try to use the garbage value as a kvm_t pointer. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=198820
Diffstat (limited to 'sbin/ddb/ddb_capture.c')
-rw-r--r--sbin/ddb/ddb_capture.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ddb/ddb_capture.c b/sbin/ddb/ddb_capture.c
index ffc9b91552df..370fc0058ba9 100644
--- a/sbin/ddb/ddb_capture.c
+++ b/sbin/ddb/ddb_capture.c
@@ -204,6 +204,7 @@ ddb_capture(int argc, char *argv[])
mflag = NULL;
nflag = NULL;
+ kvm = NULL;
while ((ch = getopt(argc, argv, "M:N:")) != -1) {
switch (ch) {
case 'M':