diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2017-01-31 19:13:48 +0100 |
---|---|---|
committer | Sage Weil <sage@redhat.com> | 2017-02-09 03:54:25 +0100 |
commit | 9365b8d7d065ae4d5234647e29f5c8612d2d5ac4 (patch) | |
tree | 0f7aeda67695468aa3513fe69591cabbda3d9dcc /src/rgw/rgw_main.cc | |
parent | rgw/rgw_rados.cc: prefer ++operator for non-primitive iterators (diff) | |
download | ceph-9365b8d7d065ae4d5234647e29f5c8612d2d5ac4.tar.xz ceph-9365b8d7d065ae4d5234647e29f5c8612d2d5ac4.zip |
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 <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/rgw/rgw_main.cc')
-rw-r--r-- | src/rgw/rgw_main.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 0330e322f4c..437f68e2de7 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; } |