Utilities: Check variables for NULL before FreePool in TestDiskImage
@@ -144,10 +144,18 @@ ContinueDmgLoop:
OcAppleDiskImageFreeContext (&DmgContext);
}
+ if (Dmg != NULL) {
FreePool (Dmg);
+ }
+
+ if (Chunklist != NULL) {
FreePool (Chunklist);
+ }
+
+ if (UncompDmg != NULL) {
FreePool (UncompDmg);
}
+ }
return 0;
}
