grub-install-common: Fix sizeof usage.

Found by: Coverity scan.
This commit is contained in:
Vladimir Serbinenko 2015-01-26 09:54:50 +01:00
parent 866f469683
commit c3f5230597

View file

@ -238,7 +238,7 @@ grub_install_push_module (const char *val)
if (modules.n_alloc < 16) if (modules.n_alloc < 16)
modules.n_alloc = 16; modules.n_alloc = 16;
modules.entries = xrealloc (modules.entries, modules.entries = xrealloc (modules.entries,
modules.n_alloc * sizeof (modules.entries)); modules.n_alloc * sizeof (*modules.entries));
} }
modules.entries[modules.n_entries++] = xstrdup (val); modules.entries[modules.n_entries++] = xstrdup (val);
modules.entries[modules.n_entries] = NULL; modules.entries[modules.n_entries] = NULL;