summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/gdb/kgdb
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-03-29 03:48:06 +0000
committerjhb <jhb@FreeBSD.org>2008-03-29 03:48:06 +0000
commit834e2b5e85c714f14867db5b5ff48321a9c09573 (patch)
tree95b1004b01249212f0f838f7fb859fdf33843908 /gnu/usr.bin/gdb/kgdb
parent5cb64aae6314c928aa4d07409d7f9e057a1ade46 (diff)
downloadFreeBSD-src-834e2b5e85c714f14867db5b5ff48321a9c09573.zip
FreeBSD-src-834e2b5e85c714f14867db5b5ff48321a9c09573.tar.gz
Initialize the head pointer in kld_current_sos() to NULL to avoid returning
a junk pointer and possibly causing a seg fault if we don't have any non-kernel klds (or are unable to walk the list due to core / kernel mismatch). MFC after: 1 week
Diffstat (limited to 'gnu/usr.bin/gdb/kgdb')
-rw-r--r--gnu/usr.bin/gdb/kgdb/kld.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/kld.c b/gnu/usr.bin/gdb/kgdb/kld.c
index 072226f..81627b9 100644
--- a/gnu/usr.bin/gdb/kgdb/kld.c
+++ b/gnu/usr.bin/gdb/kgdb/kld.c
@@ -331,6 +331,7 @@ kld_current_sos (void)
char *path;
int error;
+ head = NULL;
prev = &head;
/*
OpenPOWER on IntegriCloud