equal
deleted
inserted
replaced
127 TInt newAlloc=--iCount; |
127 TInt newAlloc=--iCount; |
128 newAlloc=(newAlloc+(KObjectConIxGranularity-1))&~(KObjectConIxGranularity-1); |
128 newAlloc=(newAlloc+(KObjectConIxGranularity-1))&~(KObjectConIxGranularity-1); |
129 if (newAlloc!=iAllocated) |
129 if (newAlloc!=iAllocated) |
130 { |
130 { |
131 if (newAlloc) |
131 if (newAlloc) |
|
132 { |
132 iContainers=(CFsObjectCon**)User::ReAlloc(iContainers,newAlloc*sizeof(CFsObjectCon*)); |
133 iContainers=(CFsObjectCon**)User::ReAlloc(iContainers,newAlloc*sizeof(CFsObjectCon*)); |
|
134 if(!iContainers) |
|
135 { |
|
136 Fault(EContainerHeapCorruptionOnRemove); |
|
137 } |
|
138 } |
133 else |
139 else |
134 { |
140 { |
135 delete iContainers; |
141 delete iContainers; |
136 iContainers=NULL; |
142 iContainers=NULL; |
137 } |
143 } |
487 } while(i>=0 && !pR->obj); |
493 } while(i>=0 && !pR->obj); |
488 TInt newAlloc=(i+KObjectIxGranularity)&~(KObjectIxGranularity-1); |
494 TInt newAlloc=(i+KObjectIxGranularity)&~(KObjectIxGranularity-1); |
489 if (newAlloc!=iAllocated) |
495 if (newAlloc!=iAllocated) |
490 { |
496 { |
491 if (newAlloc) |
497 if (newAlloc) |
|
498 { |
492 iObjects=(SFsObjectIxRec*)User::ReAlloc(iObjects,newAlloc*sizeof(SFsObjectIxRec)); |
499 iObjects=(SFsObjectIxRec*)User::ReAlloc(iObjects,newAlloc*sizeof(SFsObjectIxRec)); |
|
500 if(!iObjects) |
|
501 { |
|
502 Fault(EContainerHeapCorruptionOnRemove); |
|
503 } |
|
504 } |
493 else |
505 else |
494 { |
506 { |
495 delete iObjects; |
507 delete iObjects; |
496 iObjects=NULL; |
508 iObjects=NULL; |
497 } |
509 } |
677 TInt newAlloc=--iCount; |
689 TInt newAlloc=--iCount; |
678 newAlloc=(newAlloc+(KObjectConGranularity-1))&~(KObjectConGranularity-1); |
690 newAlloc=(newAlloc+(KObjectConGranularity-1))&~(KObjectConGranularity-1); |
679 if (newAlloc!=iAllocated) |
691 if (newAlloc!=iAllocated) |
680 { |
692 { |
681 if (newAlloc) |
693 if (newAlloc) |
|
694 { |
682 iObjects=(CFsObject**)User::ReAlloc(iObjects,newAlloc*sizeof(CFsObject*)); |
695 iObjects=(CFsObject**)User::ReAlloc(iObjects,newAlloc*sizeof(CFsObject*)); |
|
696 if(!iObjects) |
|
697 { |
|
698 Fault(EContainerHeapCorruptionOnRemove); |
|
699 } |
|
700 } |
683 else |
701 else |
684 { |
702 { |
685 delete iObjects; |
703 delete iObjects; |
686 iObjects=NULL; |
704 iObjects=NULL; |
687 } |
705 } |