]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
volser/vol_split.c: do not dereference known-NULL pointer
authorNickolai Zeldovich <nickolai@csail.mit.edu>
Sun, 6 Jan 2013 04:44:33 +0000 (23:44 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 22 Mar 2013 14:33:53 +0000 (07:33 -0700)
Avoid dereferencing a pointer that we just checked is NULL when printing
an error message.

Reviewed-on: http://gerrit.openafs.org/8878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 5c5515a5c3b34f9a115b29378e123c779c138f51)

Change-Id: I73de73f8cd9be9d106285f45e86e030909293521
Reviewed-on: http://gerrit.openafs.org/9512
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>
src/volser/vol_split.c

index d486e24879154147dbf6b397960b012fc259a2f7..0306d5fd622919c7cde5b8b8c04b1911ed2e1c14 100644 (file)
@@ -257,9 +257,9 @@ copyDir(struct Msg *m, IHandle_t *inh, IHandle_t *outh)
     infdP = IH_OPEN(inh);
     if (!infdP) {
        sprintf(m->line, "Couldn't open input directory %u.%u.%u\n",
-                   infdP->fd_ih->ih_vid,
-                   (afs_uint32)(infdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
-                   (afs_uint32)(infdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
+                   inh->ih_vid,
+                   (afs_uint32)(inh->ih_ino & NAMEI_VNODEMASK),
+                   (afs_uint32)(inh->ih_ino >> NAMEI_UNIQSHIFT));
        rx_Write(m->call, m->line, strlen(m->line));
        return EIO;
     }
@@ -275,9 +275,9 @@ copyDir(struct Msg *m, IHandle_t *inh, IHandle_t *outh)
     outfdP = IH_OPEN(outh);
     if (!outfdP) {
        sprintf(m->line, "Couldn't open output directory %u.%u.%u\n",
-                   outfdP->fd_ih->ih_vid,
-                   (afs_uint32)(outfdP->fd_ih->ih_ino & NAMEI_VNODEMASK),
-                   (afs_uint32)(outfdP->fd_ih->ih_ino >> NAMEI_UNIQSHIFT));
+                   outh->ih_vid,
+                   (afs_uint32)(outh->ih_ino & NAMEI_VNODEMASK),
+                   (afs_uint32)(outh->ih_ino >> NAMEI_UNIQSHIFT));
        rx_Write(m->call, m->line, strlen(m->line));
        FDH_REALLYCLOSE(infdP);
        return EIO;