rem: memset (passarray, 0, flags->n_iterations * sizeof (int)); free (passarray); return -1;
add: if (err < 0) { memset (passarray, 0, flags->n_iterations * sizeof (int)); free (passarray); return false; } ok = false;
context: do_wipefd (int fd, char const *qname, struct isaac_state *s,	   struct Options const *flags){  size_t i;  struct stat st;  off_t size;			/* Size to write, size to read */  unsigned long n;		/* Number of passes for printing purposes */  int *passarray;  n = 0;		/* dopass takes n -- 0 to mean "don't print progress" */  if (flags->verbose)    n = flags->n_iterations + ((flags->zero_fill) != 0);  if (fstat (fd, &st))    {      error (0, errno, "%s: fstat", qname);      return -1;    }  /* If we know that we can't possibly shred the file, give up now.     Otherwise, we may go into a infinite loop writing data before we     find that we can't rewind the device.  */  if ((S_ISCHR (st.st_mode) && isatty (fd))      || S_ISFIFO (st.st_mode)      || S_ISSOCK (st.st_mode))    {      error (0, 0, _("%s: invalid file type"), qname);      return -1;    }  /* Allocate pass array */  passarray = xmalloc (flags->n_iterations * sizeof (int));  size = flags->size;  if (size == -1)    {      /* Accept a length of zero only if it's a regular file.	 For any other type of file, try to get the size another way.  */      if (S_ISREG (st.st_mode))	{	  size = st.st_size;	  if (size < 0)	    {	      error (0, 0, _("%s: file has negative size"), qname);	      return -1;	    }	}      else	{	  size = lseek (fd, (off_t) 0, SEEK_END);	  if (size <= 0)	    {	      /* We are unable to determine the length, up front.		 Let dopass do that as part of its first iteration.  */	      size = -1;	    }	}      /* Allow `rounding up' only for regular files.  */      if (0 <= size && !(flags->exact) && S_ISREG (st.st_mode))	{	  size += ST_BLKSIZE (st) - 1 - (size - 1) % ST_BLKSIZE (st);	  /* If in rounding up, we've just overflowed, use the maximum.  */	  if (size < 0)	    size = TYPE_MAXIMUM (off_t);	}    }  /* Schedule the passes in random order. */  genpattern (passarray, flags->n_iterations, s);  /* Do the work */  for (i = 0; i < flags->n_iterations; i++)    {      if (dopass (fd, qname, &size, passarray[i], s, i + 1, n) < 0)	{	  memset (passarray, 0, flags->n_iterations * sizeof (int));	  free (passarray);	  return -1;	}    }  memset (passarray, 0, flags->n_iterations * sizeof (int));  free (passarray);  if (flags->zero_fill)    if (dopass (fd, qname, &size, 0, s, flags->n_iterations + 1, n) < 0)      return -1;  /* Okay, now deallocate the data.  The effect of ftruncate on     non-regular files is unspecified, so don't worry about any     errors reported for them.  */  if (flags->remove_file && ftruncate (fd, (off_t) 0) != 0      && S_ISREG (st.st_mode))    {      error (0, errno, _("%s: error truncating"), qname);      return -1;    }  return 0;}