diff options
author | jhb <jhb@FreeBSD.org> | 2009-11-02 20:18:50 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2009-11-02 20:18:50 +0000 |
commit | d95dbb3136cc8c7dfecf945d8fd916ea197c487e (patch) | |
tree | ef86eeed636872c29ff4782cfa0ff62344e5bb86 /sbin | |
parent | 36d63b3d79eb7be66b0e07d09723e0f7f9d089a2 (diff) | |
download | FreeBSD-src-d95dbb3136cc8c7dfecf945d8fd916ea197c487e.zip FreeBSD-src-d95dbb3136cc8c7dfecf945d8fd916ea197c487e.tar.gz |
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
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ddb/ddb_capture.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ddb/ddb_capture.c b/sbin/ddb/ddb_capture.c index ffc9b91..370fc00 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': |