mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-20 19:42:53 -08:00
Allow unaligned-size allocations in igc_xzalloc_ambig
* src/igc.c (igc_xzalloc_ambig): Increase size argument so it's aligned.
This commit is contained in:
parent
7591e5b0a4
commit
fe6849068f
1 changed files with 2 additions and 0 deletions
|
|
@ -2947,6 +2947,8 @@ igc_xzalloc_ambig (size_t size)
|
|||
/* Not sure if xzalloc can ever return NULL here, depending on all the
|
||||
config options involved. Also not sure when it returns non-null for
|
||||
size 0. It does for me on macOS. */
|
||||
while (size % IGC_ALIGN_DFLT)
|
||||
size++;
|
||||
void *p = xzalloc (size);
|
||||
if (p == NULL)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue