]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
radosgw-admin: fix leaks with make_unique() 39211/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 1 Feb 2021 21:30:05 +0000 (16:30 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 1 Feb 2021 21:44:59 +0000 (16:44 -0500)
commit5302c18c7eeda11021714eeb01438f20e580e166
treed34083028b95ac7ef9aa3c0fadd76952fdde3abe
parent27c32caa1972af65977c08774731a6233d0ff9e5
radosgw-admin: fix leaks with make_unique()

`make_unique<T>(args...)` itself uses `new T(args...)`, so this code was
allocating an extra Formatter pointer, and passing that to the actual
Formatter's constructor where it was converted to `bool pretty` and so
never freed. this also prevented `bool pretty_format` from taking effect

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_admin.cc