Fixes: #10082
dzafman-2014-11-13_10:42:58-rgw-wip-10082-testing-basic-multi
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
librados::NObjectIterator::NObjectIterator(const NObjectIterator &rhs)
{
if (rhs.impl == NULL) {
+ delete impl;
impl = NULL;
return;
}
librados::NObjectIterator& librados::NObjectIterator::operator=(const librados::NObjectIterator &rhs)
{
+ if (rhs.impl == NULL) {
+ delete impl;
+ impl = NULL;
+ return *this;
+ }
if (impl == NULL)
impl = new NObjectIteratorImpl();
*impl = *(rhs.impl);
librados::ListObject::ListObject(const ListObject& rhs)
{
if (rhs.impl == NULL) {
+ delete impl;
impl = NULL;
return;
}
librados::ListObject& librados::ListObject::operator=(const ListObject& rhs)
{
+ if (rhs.impl == NULL) {
+ delete impl;
+ impl = NULL;
+ return *this;
+ }
if (impl == NULL)
impl = new ListObjectImpl();
*impl = *(rhs.impl);