Skip to content

Commit

Permalink
mapshape: remove redundant NULL check
Browse files Browse the repository at this point in the history
The SfRealloc() return value has already been checked, and it's
impossible for pabyRec to be still NULL.
  • Loading branch information
MaxKellermann committed Oct 7, 2021
1 parent a913c49 commit 62eb83a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mapshape.c
Expand Up @@ -1012,10 +1012,6 @@ static int msSHPReadAllocateBuffer( SHPHandle psSHP, int hEntity, const char* ps
psSHP->pabyRec = pabyRec;
psSHP->nBufSize = nEntitySize;
}
if (psSHP->pabyRec == NULL) {
msSetError(MS_MEMERR, "Out of memory", pszCallingFunction);
return(MS_FAILURE);
}
return MS_SUCCESS;
}

Expand Down

0 comments on commit 62eb83a

Please sign in to comment.