mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
Windows: Apply cm_GetVolServerList() to cm_ConnFromVolume()
Use cm_GetVolServerList() in cm_ConnFromVolume() to ensure an error is returned instead of dereferencing a NULL pointer if the serverRef list for the requested volume cannot be obtained. Change-Id: I265b7e8b64fcf6b4444c7d504e5109d67fa48089 Reviewed-on: http://gerrit.openafs.org/7724 Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
This commit is contained in:
parent
4e3400414f
commit
3b3b620a03
@ -1709,7 +1709,9 @@ long cm_ConnFromVolume(struct cm_volume *volp, unsigned long volid, struct cm_us
|
||||
|
||||
*connpp = NULL;
|
||||
|
||||
serverspp = cm_GetVolServers(volp, volid, userp, reqp, &replicated);
|
||||
code = cm_GetVolServerList(volp, volid, userp, reqp, &replicated, &serverspp);
|
||||
if (code)
|
||||
return code;
|
||||
|
||||
code = cm_ConnByMServers(*serverspp, replicated, userp, reqp, connpp);
|
||||
cm_FreeServerList(serverspp, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user