Commit 5a1564e6 authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: [CHECKER] Fix a possible null-pointer dereference

parent 533a071f
......@@ -982,7 +982,9 @@ static int dtSplitUp(tid_t tid,
split->pxdlist = &pxdlist;
rc = dtSplitRoot(tid, ip, split, &rmp);
DT_PUTPAGE(rmp);
if (!rc)
DT_PUTPAGE(rmp);
DT_PUTPAGE(smp);
goto freeKeyName;
......@@ -1876,6 +1878,9 @@ static int dtSplitRoot(tid_t tid,
xlen = lengthPXD(pxd);
xsize = xlen << JFS_SBI(sb)->l2bsize;
rmp = get_metapage(ip, rbn, xsize, 1);
if (!rmp)
return -EIO;
rp = rmp->data;
BT_MARK_DIRTY(rmp, ip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment