From 95669a2f9f160f6340e88b5672e8ebeb8ab8c6a4 Mon Sep 17 00:00:00 2001
From: Jonh Wendell <jonh.wendell@vexcorp.com>
Date: Fri, 16 Mar 2012 09:17:58 -0300
Subject: [PATCH] Don't dereference a null pointer.

In test_config() we check if certain values exist in the config structure.
If they don't, we should only check if it's NULL.
---
 lib/config.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/config.c b/lib/config.c
index 2f2835c..7042730 100644
--- a/lib/config.c
+++ b/lib/config.c
@@ -530,12 +530,12 @@ int test_config(rc_handle *rh, char *filename)
 	char	    *file;
 #endif
 
-	if (!(rc_conf_srv(rh, "authserver")->max))
+	if (!(rc_conf_srv(rh, "authserver")))
 	{
 		rc_log(LOG_ERR,"%s: no authserver specified", filename);
 		return -1;
 	}
-	if (!(rc_conf_srv(rh, "acctserver")->max))
+	if (!(rc_conf_srv(rh, "acctserver")))
 	{
 		rc_log(LOG_ERR,"%s: no acctserver specified", filename);
 		return -1;
-- 
1.7.5.4

