Changed charalloc's calloc() call to use sizeof (char) not sizeof(char *)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@663 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
8d848afb89
commit
3b41212d61
2
utils.c
2
utils.c
|
@ -107,7 +107,7 @@ char *charalloc(size_t howmuch)
|
||||||
|
|
||||||
/* Panic save? */
|
/* Panic save? */
|
||||||
|
|
||||||
if (!(r = calloc(howmuch, sizeof (char *))))
|
if (!(r = calloc(howmuch, sizeof (char))))
|
||||||
die(_("nano: calloc: out of memory!"));
|
die(_("nano: calloc: out of memory!"));
|
||||||
|
|
||||||
return (char *) r;
|
return (char *) r;
|
||||||
|
|
Loading…
Reference in New Issue