]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix (im)possible leak
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 27 Sep 2012 22:00:09 +0000 (15:00 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Mon, 8 Oct 2012 22:11:19 +0000 (15:11 -0700)
Fixes coverity issue

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_tools.cc

index baa22a2895eded51ca9fa3708025483a68214c71..4201bd42d06e9bfe999ea44599b5b75c847a26c7 100644 (file)
@@ -130,6 +130,7 @@ static int ext_mime_map_init(CephContext *cct, const char *ext_map)
   if (ret != st.st_size) {
     // huh? file size has changed, what are the odds?
     ldout(cct, 0) << "ext_mime_map_init(): raced! will retry.." << dendl;
+    free(buf);
     close(fd);
     return ext_mime_map_init(cct, ext_map);
   }