mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
*** empty log message ***
git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@305 29311d96-e01e-0410-9327-a35deaab8ce9
This commit is contained in:
parent
d2197ce79e
commit
a1ba05c9b7
@ -159,7 +159,7 @@ class bufferptr {
|
||||
}
|
||||
|
||||
~bufferptr() {
|
||||
if (_buffer->_put() == 0)
|
||||
if (_buffer && _buffer->_put() == 0)
|
||||
delete _buffer;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user