Move the null pointer check to before the pointer is dereferenced.
Reviewed-on: http://gerrit.openafs.org/8882
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit
4d6967e0b0a0628deb1dd9d210de84779d41f856)
Change-Id: Ib6c9308170b1242ea207f5380275d51b1514028d
Reviewed-on: http://gerrit.openafs.org/9515
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
int xflags;
afs_int32 code = 0, error = 0, rc = 0;
+ if (!info || !tape)
+ ERROR_EXIT(BUTM_BADARGUMENT);
+
if (info->debug)
printf("butm: Mount tape drive\n");
POLL();
info->error = 0;
- if (!info || !tape)
- ERROR_EXIT(BUTM_BADARGUMENT);
if (info->structVersion != BUTM_MAJORVERSION)
ERROR_EXIT(BUTM_OLDINTERFACE);
if (info->tmRock)