(initialize_tables): reset tl and td to NULL after freeing.
+2013-10-30 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/io/gzio.c (huft_build): Use zalloc for safety.
+ (initialize_tables): reset tl and td to NULL after freeing.
+
2013-10-28 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/loader/multiboot_mbi2.c: Implement network tag.
z = 1 << j; /* table entries for j-bit table */
/* allocate and link in new table */
- q = (struct huft *) grub_malloc ((z + 1) * sizeof (struct huft));
+ q = (struct huft *) grub_zalloc ((z + 1) * sizeof (struct huft));
if (! q)
{
if (h)
/* Reset memory allocation stuff. */
huft_free (gzio->tl);
huft_free (gzio->td);
+ gzio->tl = NULL;
+ gzio->td = NULL;
}