why do we delete target in RGWGetObjLayout constructed function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I saw this problem when i read RGW source code. It seems that that
`delete` a nullptr will segment fault.

code[1]:

class RGWGetObjLayout : public RGWOp {
   protected:
        RGWRados::Object *target{nullptr};
        RGWObjManifest *manifest{nullptr};
        rgw_raw_obj head_obj;
    public:
         RGWGetObjLayout() {
             delete target;
   }


[1]. https://github.com/ceph/ceph/blob/master/src/rgw/rgw_op.h#L1777
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux