From e33bdad36bb96a2477f1511d82b597113919a11a Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 22 Feb 2013 10:20:58 +0000 Subject: [PATCH] viced: Catch GetCellInfo failure If GetCellInfo returns a non-zero result, catch the error, rather than just carrying on regardless. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 1d1ba5f74102ae703ef657aa19150729edfe6ab2) Change-Id: I205b32a3e38faeae8e06bad3dc615ba01f0626d8 Reviewed-on: http://gerrit.openafs.org/9533 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/viced/viced.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/viced/viced.c b/src/viced/viced.c index 40d90874f..e580c17ec 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -1648,6 +1648,11 @@ vl_Initialize(const char *confDir) exit(1); } code = afsconf_GetCellInfo(tdir, NULL, AFSCONF_VLDBSERVICE, &info); + if (code) { + ViceLog(0, + ("vl_Initialize: Failed to get cell information\n")); + exit(1); + } if (info.numServers > MAXSERVERS) { ViceLog(0, ("vl_Initialize: info.numServers=%d (> MAXSERVERS=%d)\n", -- 2.39.5