View | Details | Raw Unified | Return to bug 1759
Collapse All | Expand All

(-)a/model/dce-fd.cc (-3 / +4 lines)
 Lines 320-335    Link Here 
320
    }
320
    }
321
321
322
  void *buf = malloc (count);
322
  void *buf = malloc (count);
323
  void *bufp = buf;
323
  for (int i = 0; i < iovcnt; ++i)
324
  for (int i = 0; i < iovcnt; ++i)
324
    {
325
    {
325
      memcpy (buf, iov[i].iov_base, iov[i].iov_len);
326
      memcpy (bufp, iov[i].iov_base, iov[i].iov_len);
326
      buf += iov[i].iov_len;
327
      bufp += iov[i].iov_len;
327
    }
328
    }
328
329
329
  UnixFd *unixFd = current->process->openFiles[fd]->GetFileInc ();
330
  UnixFd *unixFd = current->process->openFiles[fd]->GetFileInc ();
330
  int retval = unixFd->Write (buf, count);
331
  int retval = unixFd->Write (buf, count);
331
  FdDecUsage (fd);
332
  FdDecUsage (fd);
332
  free (buf - count);
333
  free (buf);
333
334
334
  return retval;
335
  return retval;
335
}
336
}

Return to bug 1759