summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-12-22 18:53:19 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-12-22 18:53:19 +0100
commit91f245ab5b39d377366934cdc1b57ebd89f3d33d (patch)
treea5b15e611dadabcd652d6aadc2f5eb18894fbe3d
parentf0dbc9865fd0533828a4b500e51e3aee2c494877 (diff)
downloadsamba-91f245ab5b39d377366934cdc1b57ebd89f3d33d.tar.gz
samba-91f245ab5b39d377366934cdc1b57ebd89f3d33d.tar.bz2
samba-91f245ab5b39d377366934cdc1b57ebd89f3d33d.zip
Fix segfault when there are no tests registered.
-rw-r--r--source4/torture/smbtorture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/torture/smbtorture.c b/source4/torture/smbtorture.c
index 0c2c8c0f6b..635990354c 100644
--- a/source4/torture/smbtorture.c
+++ b/source4/torture/smbtorture.c
@@ -49,7 +49,7 @@ static bool run_matching(struct torture_context *torture,
if (suite == NULL) {
struct torture_suite *o;
- for (o = torture_root->children; o; o = o->next) {
+ for (o = (torture_root == NULL?NULL:torture_root->children); o; o = o->next) {
if (gen_fnmatch(expr, o->name) == 0) {
*matched = true;
reload_charcnv(torture->lp_ctx);