From: Danny Al-Gaaf Date: Tue, 31 Jan 2017 18:13:48 +0000 (+0100) Subject: rgw/rgw_main.cc: close leak in error case X-Git-Tag: v12.0.1~462^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9365b8d7d065ae4d5234647e29f5c8612d2d5ac4;p=ceph.git rgw/rgw_main.cc: close leak in error case ID 1398895 (#1 of 1): Resource leak (RESOURCE_LEAK) leaked_storage: Variable config going out of scope leaks the storage it points to. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 0330e322f4cb..437f68e2de76 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -250,6 +250,7 @@ int main(int argc, const char **argv) RGWFrontendConfig *config = new RGWFrontendConfig(f); int r = config->init(); if (r < 0) { + delete config; cerr << "ERROR: failed to init config: " << f << std::endl; return EINVAL; }