aboutsummaryrefslogtreecommitdiffstats
path: root/package/uhttpd/src/uhttpd-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'package/uhttpd/src/uhttpd-utils.c')
-rw-r--r--package/uhttpd/src/uhttpd-utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/package/uhttpd/src/uhttpd-utils.c b/package/uhttpd/src/uhttpd-utils.c
index 96c0b82cda..caa6b12bc6 100644
--- a/package/uhttpd/src/uhttpd-utils.c
+++ b/package/uhttpd/src/uhttpd-utils.c
@@ -622,10 +622,14 @@ struct auth_realm * uh_auth_add(char *path, char *user, char *pass)
min(strlen(pass), sizeof(new->pass) - 1));
}
- uh_realm_count++;
+ if( new->pass[0] )
+ {
+ uh_realm_count++;
+ return new;
+ }
}
- return new;
+ return NULL;
}
int uh_auth_check(