summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-06 16:17:26 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-09 19:41:52 +0100
commitbd55e5ccce4b35ffb1028d7810b93df3b7522d05 (patch)
treeb4346969eca1a7fde3fe912ea0514aef121528cd /auth
parentd22ba3e7629976f6a55382140945e92a4d5600b7 (diff)
auth: fix use of uninitialized variable err
Previously a plausible execution path existed so the value of err was undefined at the end of the function, making the function return arbitrary error values. Fix this by initializing it to 0. Found using the Clang Static Analyzer. * auth/auth.c (S_auth_server_authenticate): Initialize err to 0.
Diffstat (limited to 'auth')
-rw-r--r--auth/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/auth/auth.c b/auth/auth.c
index 167d8f02..91a21e45 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -381,7 +381,7 @@ S_auth_server_authenticate (struct authhandle *serverauth,
{
struct pending_user *u;
struct authhandle *user;
- error_t err;
+ error_t err = 0;
if (! serverauth)
return EOPNOTSUPP;