Fix an unititialized memory read.
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 6 Jan 2007 17:55:47 +0000 (17:55 +0000)
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 6 Jan 2007 17:55:47 +0000 (17:55 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2184 6f19259b-4bc3-4df7-8a09-765794883524

EdkUnixPkg/Sec/UgaX11.c

index 565689a..5fbdeae 100644 (file)
@@ -527,7 +527,7 @@ UgaCreate (EFI_UNIX_UGA_IO_PROTOCOL **Uga, CONST CHAR16 *Title)
   int title_len;
 
   drv = (UGA_IO_PRIVATE *)
-    malloc (sizeof (UGA_IO_PRIVATE));
+    calloc (1, sizeof (UGA_IO_PRIVATE));
   if (drv == NULL)
     return EFI_OUT_OF_RESOURCES;