CEPH filesystem development
 help / color / mirror / Atom feed
* why do we delete target in RGWGetObjLayout constructed function?
@ 2017-03-17  9:58 liuchang0812
  2017-03-17 10:08 ` liuchang0812
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: liuchang0812 @ 2017-03-17  9:58 UTC (permalink / raw)
  To: ceph-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-19 23:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-17  9:58 why do we delete target in RGWGetObjLayout constructed function? liuchang0812
2017-03-17 10:08 ` liuchang0812
     [not found] ` <13a064ed-c7b9-c495-ee36-246583eea4e1@redhat.com>
2017-03-17 11:11   ` liuchang0812
2017-03-19 23:03 ` Matt Benjamin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox