]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/rgw_main.cc: reorder framework detection
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 31 Jan 2017 16:58:44 +0000 (17:58 +0100)
committerSage Weil <sage@redhat.com>
Thu, 9 Feb 2017 02:54:25 +0000 (21:54 -0500)
commitcc63f928d67488dcc56cce91a32a1fddc9a78927
treebd04dc2b0639bbd6b2c7b7ba565e501c04ed8e50
parent33de6f701411e1d9e2cc9a6450e347bd32eca64f
rgw/rgw_main.cc: reorder framework detection

Fix for:

CID 1398896: Resource leak (RESOURCE_LEAK)
 overwrite_var: Overwriting fe in fe = new
 RGWLoadGenFrontend(env, config) leaks the storage that fe
 points to.

Do not check again and again for framework if there is
already a match, make use of if/else. This should also
fix the RESOURCE_LEAK warning.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_main.cc