From c6737e1b8aab62e7dd509f1ff87a85f4a8278699 Mon Sep 17 00:00:00 2001 From: amitkuma Date: Thu, 21 Sep 2017 19:46:23 +0530 Subject: [PATCH] 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 --- src/rgw/rgw_rest.cc | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.3