Check for NULL hs_type first
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 24 May 2014 15:59:53 +0000 (16:59 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 24 May 2014 16:00:30 +0000 (17:00 +0100)
src/main/realms.c

index cdc80a0..44318fd 100644 (file)
@@ -475,7 +475,7 @@ static int home_server_add(realm_config_t *rc, CONF_SECTION *cs)
         *      Use a reasonable default.
         */
  skip_port:
-       if ((strcasecmp(hs_type, "auth+acct") == 0) || !hs_type) {
+       if (!hs_type || (strcasecmp(hs_type, "auth+acct") == 0)) {
                home->type = HOME_TYPE_AUTH;
                dual = true;
        } else if (strcasecmp(hs_type, "auth") == 0) {