From: amitkuma Date: Thu, 21 Sep 2017 14:16:23 +0000 (+0530) Subject: rgw: Error check on return of read_line() X-Git-Tag: v13.0.1~787^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c6737e1b8aab62e7dd509f1ff87a85f4a8278699;p=ceph.git rgw: Error check on return of read_line() ** 1406089 Unused value CID 1406089 (#1 of 1): Unused value (UNUSED_VALUE) returned_value: Assigning value from this->read_line (bl, chunk_size, reached_boundary, done) to r here, but that stored value is overwritten before it can be used. Signed-off-by: Amit Kumar --- diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 27cdaf1353e..5963d40cbb4 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -1419,6 +1419,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;