From: Radoslaw Zarzynski Date: Thu, 11 May 2017 15:28:14 +0000 (+0200) Subject: rgw: fix error handling in Browser Uploads. X-Git-Tag: v13.0.2~243^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=60a31af82d9c27f3bd30a2530023da6ff7eb71b6;p=ceph.git rgw: fix error handling in Browser Uploads. 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 --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 040f972467c..cb0e8c1fac0 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -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;