diff options
Diffstat (limited to 'c/src/exec/libfs/src/imfs/memfile.c')
-rw-r--r-- | c/src/exec/libfs/src/imfs/memfile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/c/src/exec/libfs/src/imfs/memfile.c b/c/src/exec/libfs/src/imfs/memfile.c index 8ae7e5e6ba..fc2680fcfe 100644 --- a/c/src/exec/libfs/src/imfs/memfile.c +++ b/c/src/exec/libfs/src/imfs/memfile.c @@ -509,6 +509,8 @@ int IMFS_memfile_remove( if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { p = (block_p *) info->triply_indirect[i]; + if ( !p ) /* ensure we have a valid pointer */ + break; for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) { if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); |