If DoBosHostList ends up being called without the -server argument
in its command structure, then a printf will attempt to dereference
a NULL pointer to the -server field.
Caught by clang-analyzer
Change-Id: I1114406d03b265f4d780efd8e84fea53013cb51c
Reviewed-on: http://gerrit.openafs.org/2143
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cellHandle, as->parms[SERVER].items->data, &bos_server, &st)) {
ERR_ST_EXT("bos_ServerOpen", st);
}
+
+ printf("Listing hosts at server %s\n", as->parms[SERVER].items->data);
}
if (!bos_HostGetBegin(bos_server, &iter, &st)) {
ERR_ST_EXT("bos_HostGetBegin", st);
}
- printf("Listing hosts at server %s\n", as->parms[SERVER].items->data);
while (bos_HostGetNext(iter, host, &st)) {
printf("\t%s\n", host);