]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix error handling in Browser Uploads. 15054/head
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 11 May 2017 15:28:14 +0000 (17:28 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Thu, 11 May 2017 15:36:52 +0000 (17:36 +0200)
The recent Coverity Scan for Ceph (published May 11, 2017 on
ceph-devel) shows that the read_form_part_header method of
RGWPostObj_ObjStore assigns to a variable but doesn't use it
later. The anomaly is caused by lack of proper error handling.
This commit rectifies it.

Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_rest.cc

index 040f972467c8c896afa151aaf6cf873b38f75154..cb0e8c1fac0776b4bcf930fa120d52a104ca238b 100644 (file)
@@ -1492,6 +1492,9 @@ int RGWPostObj_ObjStore::read_form_part_header(struct post_form_part* const part
     }
 
     r = read_line(bl, chunk_size, reached_boundary, done);
+    if (r < 0) {
+      return r;
+    }
   }
 
   return 0;