[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs & MAXPATHLEN

From: Richard M. Stallman
Subject: Re: emacs & MAXPATHLEN
Date: Fri, 29 Jul 2005 23:34:13 -0400

    > +      buf = malloc(strlen(pwd)+1);
    > +      if(!buf)
    > +        fatal ("`malloc' failed in init_buffer\n");

    This should have used xmalloc instead of calling malloc and checking
    for errors.

Actually I don't think so.  xmalloc reports errors using Fsignal, and
that is the wrong thing to do, this early in Emacs startup.

It might be ok just to use abort, since it should not be possible
to run out of memory at that point.

In xsmfns.c, it would be right to use xmalloc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]