Commit bb13c350 by Jakub Jelinek Committed by Jakub Jelinek

* runtime/memory.c (allocate_size): Malloc 1 byte if size == 0.

From-SVN: r104909
parent 01406f86
2005-10-03 Jakub Jelinek <jakub@redhat.com>
* runtime/memory.c (allocate_size): Malloc 1 byte if size == 0.
2005-10-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/19308
......
......@@ -182,7 +182,7 @@ allocate_size (void **mem, size_t size, GFC_INTEGER_4 * stat)
if (!mem)
runtime_error ("Internal: NULL mem pointer in ALLOCATE.");
newmem = malloc (size);
newmem = malloc (size ? size : 1);
if (!newmem)
{
if (stat)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment