summaryrefslogtreecommitdiff
path: root/src/providers/fail_over.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-06-07 10:59:33 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-06-09 08:29:34 -0400
commitc67ddf1e339c164a310e3e93ef8fe08a7ffd7c49 (patch)
treeaab15aec33ff3999f554f495818c0bc847a16384 /src/providers/fail_over.c
parent711fc7d00135cb5fb202efe1a0b77c61b4f2c099 (diff)
downloadsssd-c67ddf1e339c164a310e3e93ef8fe08a7ffd7c49.tar.gz
sssd-c67ddf1e339c164a310e3e93ef8fe08a7ffd7c49.tar.bz2
sssd-c67ddf1e339c164a310e3e93ef8fe08a7ffd7c49.zip
Fix potential NULL dereference in fail_over.c
Fixes: #505
Diffstat (limited to 'src/providers/fail_over.c')
-rw-r--r--src/providers/fail_over.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index b719dea8..ada5b57f 100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -1122,8 +1122,11 @@ fo_get_server_port(struct fo_server *server)
const char *fo_get_server_name(struct fo_server *server)
{
- if (!server->common && fo_is_srv_lookup(server)) {
- return "SRV lookup meta-server";
+ if (!server->common) {
+ if (fo_is_srv_lookup(server)) {
+ return "SRV lookup meta-server";
+ }
+ return "unknown name";
}
return server->common->name;