1. petsc
  2. PETSc
  3. petsc

Commits

Jed Brown  committed 5d7c30b

Sys SegBuffer: allow destroy with already-NULL segbuffer

  • Participants
  • Parent commits cabb514
  • Branches master

Comments (0)

Files changed (1)

File src/sys/utils/segbuffer.c

View file
   struct _PetscSegBufferLink *s;
 
   PetscFunctionBegin;
+  if (!*seg) PetscFunctionReturn(0);
   for (s=(*seg)->head; s;) {
     struct _PetscSegBufferLink *tail = s->tail;
     ierr = PetscFree(s);CHKERRQ(ierr);