userlibandfileserver/fileserver/sfile/sf_obj.cpp
branchRCL_3
changeset 43 c1f20ce4abcf
parent 23 1df514389a47
child 44 3e88ff8f41d5
equal deleted inserted replaced
42:a179b74831c9 43:c1f20ce4abcf
   129 			if (newAlloc!=iAllocated)
   129 			if (newAlloc!=iAllocated)
   130 				{
   130 				{
   131 				if (newAlloc)
   131 				if (newAlloc)
   132 				    {
   132 				    {
   133 					iContainers=(CFsObjectCon**)User::ReAlloc(iContainers,newAlloc*sizeof(CFsObjectCon*));
   133 					iContainers=(CFsObjectCon**)User::ReAlloc(iContainers,newAlloc*sizeof(CFsObjectCon*));
   134 					__ASSERT_DEBUG(iContainers,User::Panic(_L("FS_LDR panic"),ELdrHeapCorruptionOnRemove));
   134 					if(!iContainers)
       
   135 					    {
       
   136 					    Fault(EContainerHeapCorruptionOnRemove);
       
   137 					    }
   135 				    }
   138 				    }
   136 				else
   139 				else
   137 					{
   140 					{
   138 					delete iContainers;
   141 					delete iContainers;
   139 					iContainers=NULL;
   142 					iContainers=NULL;
   492 		if (newAlloc!=iAllocated)
   495 		if (newAlloc!=iAllocated)
   493 			{
   496 			{
   494 			if (newAlloc)
   497 			if (newAlloc)
   495 			    {
   498 			    {
   496 				iObjects=(SFsObjectIxRec*)User::ReAlloc(iObjects,newAlloc*sizeof(SFsObjectIxRec));
   499 				iObjects=(SFsObjectIxRec*)User::ReAlloc(iObjects,newAlloc*sizeof(SFsObjectIxRec));
   497 				__ASSERT_DEBUG(iObjects,User::Panic(_L("FS_LDR panic"),ELdrHeapCorruptionOnRemove));
   500 				if(!iObjects)
       
   501 				    {
       
   502                     Fault(EContainerHeapCorruptionOnRemove);
       
   503 				    }
   498 			    }
   504 			    }
   499 			else
   505 			else
   500 				{
   506 				{
   501 				delete iObjects;
   507 				delete iObjects;
   502 				iObjects=NULL;
   508 				iObjects=NULL;
   685 			if (newAlloc!=iAllocated)
   691 			if (newAlloc!=iAllocated)
   686 				{
   692 				{
   687 				if (newAlloc)
   693 				if (newAlloc)
   688 				    {
   694 				    {
   689 					iObjects=(CFsObject**)User::ReAlloc(iObjects,newAlloc*sizeof(CFsObject*));
   695 					iObjects=(CFsObject**)User::ReAlloc(iObjects,newAlloc*sizeof(CFsObject*));
   690 					__ASSERT_DEBUG(iObjects,User::Panic(_L("FS_LDR panic"),ELdrHeapCorruptionOnRemove));
   696 					if(!iObjects)
       
   697 					    {
       
   698 					    Fault(EContainerHeapCorruptionOnRemove);
       
   699 					    }
   691 				    }
   700 				    }
   692 				else
   701 				else
   693 					{
   702 					{
   694 					delete iObjects;
   703 					delete iObjects;
   695 					iObjects=NULL;
   704 					iObjects=NULL;