add: buf = new_buf;
context: full_filename_ (Dirstack_state const *ds, const char *filename){  static char *buf = NULL;  static size_t n_allocated = 0;  int dir_len = obstack_object_size (&ds->dir_stack);  char *dir_name = (char *) obstack_base (&ds->dir_stack);  size_t n_bytes_needed;  size_t filename_len;  filename_len = strlen (filename);  n_bytes_needed = dir_len + filename_len + 1;  if (n_allocated < n_bytes_needed)    {      /* This code requires that realloc accept NULL as the first arg.         This function must not use xrealloc.  Otherwise, an out-of-memory	 error involving a file name to be expanded here wouldn't ever	 be issued.  Use realloc and fall back on using a static buffer	 if memory allocation fails.  */      buf = realloc (buf, n_bytes_needed);      n_allocated = n_bytes_needed;      if (buf == NULL)	{#define SBUF_SIZE 512#define ELLIPSES_PREFIX "[...]"	  static char static_buf[SBUF_SIZE];	  int truncated;	  size_t len;	  char *p;	  len = right_justify (static_buf, SBUF_SIZE, filename,			       filename_len + 1, &p, &truncated);	  right_justify (static_buf, len, dir_name, dir_len, &p, &truncated);	  if (truncated)	    {	      memcpy (static_buf, ELLIPSES_PREFIX,		      sizeof (ELLIPSES_PREFIX) - 1);	    }	  return p;	}    }  if (filename_len == 1 && *filename == '.' && dir_len)    {      /* FILENAME is just `.' and dir_len is nonzero.	 Copy the directory part, omitting the trailing slash,	 and append a trailing zero byte.  */      char *p = mempcpy (buf, dir_name, dir_len - 1);      *p = 0;    }  else    {      /* Copy the directory part, including trailing slash, and then	 append the filename part, including a trailing zero byte.  */      memcpy (mempcpy (buf, dir_name, dir_len), filename, filename_len + 1);      assert (strlen (buf) + 1 == n_bytes_needed);    }  return buf;}