imagingext_pub/exif_api/tsrc/src/ExifCreateTest.cpp
changeset 27 b0bc8115cfe9
parent 0 469c91dae73b
--- a/imagingext_pub/exif_api/tsrc/src/ExifCreateTest.cpp	Tue Sep 14 16:30:15 2010 +0300
+++ b/imagingext_pub/exif_api/tsrc/src/ExifCreateTest.cpp	Wed Oct 13 13:10:46 2010 +0300
@@ -25,9 +25,10 @@
 	HBufC8* jpeg = TUtils::ReadFileL(iFs, KValidJpeg);
 	CleanupStack::PushL(jpeg);
 	CExifModify* modify = CExifModify::NewL(*jpeg, CExifModify::ECreate);
+	CleanupStack::PushL(modify);
 	if(!modify)
-		User::Leave(KErrGeneral);
-	delete modify;
+        User::Leave(KErrGeneral);
+	CleanupStack::PopAndDestroy(modify);
 	CleanupStack::PopAndDestroy(jpeg);
 	}