*** empty log message ***

git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@305 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
sage 2005-06-13 15:47:39 +00:00
parent d2197ce79e
commit a1ba05c9b7
2 changed files with 3 additions and 4 deletions

View File

@ -159,7 +159,7 @@ class bufferptr {
}
~bufferptr() {
if (_buffer->_put() == 0)
if (_buffer && _buffer->_put() == 0)
delete _buffer;
}

View File

@ -17,13 +17,12 @@ class bufferlist {
public:
// cons/des
~bufferlist() {
clear();
}
// sort-of-like-assignment-op
void claim(bufferlist& bl) {
// free my buffers
clear();
_buffers.clear();
claim_append(bl);
}
void claim_append(bufferlist& bl) {
@ -162,7 +161,7 @@ class bufferlist {
void substr_of(bufferlist& other, int off, int len) {
clear();
_buffers.clear();
// skip off
list<bufferptr>::iterator curbuf = other._buffers.begin();