]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crush: fix memory leak
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 15 Jan 2019 08:23:26 +0000 (16:23 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 15 Jan 2019 08:23:26 +0000 (16:23 +0800)
commitc18d377c9fd5dc578893cef1e2e8574b150b0169
tree33faa59625ec1264625d4332f9adabdcf600877d
parent0334cc19fa35cb26f32c4202fd6325e26a1918f5
crush: fix memory leak

If we remove the last item of bucket, there should still be
one final entry in the __weights__ field of __weight_set__.
Free the corresponding memory before we __null__ the pointer.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/crush/CrushWrapper.cc