[BACK]Return to buf.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/buf.c between version 1.82 and 1.83

version 1.82, 2015/02/05 12:59:57 version 1.83, 2015/11/05 09:48:21
Line 119 
Line 119 
 void  void
 buf_free(BUF *b)  buf_free(BUF *b)
 {  {
         if (b->cb_buf != NULL)          if (b == NULL)
                 xfree(b->cb_buf);                  return;
         xfree(b);          free(b->cb_buf);
           free(b);
 }  }
   
 /*  /*
  * Free the buffer <b>'s structural information but do not free the contents   * Free the buffer <b>'s structural information but do not free the contents
  * of the buffer.  Instead, they are returned and should be freed later using   * of the buffer.  Instead, they are returned and should be freed later.
  * xfree().  
  */   */
 void *  void *
 buf_release(BUF *b)  buf_release(BUF *b)
Line 135 
Line 135 
         void *tmp;          void *tmp;
   
         tmp = b->cb_buf;          tmp = b->cb_buf;
         xfree(b);          free(b);
         return (tmp);          return (tmp);
 }  }
   

Legend:
Removed from v.1.82  
changed lines
  Added in v.1.83