]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Error check on return of read_line() 17880/head
authoramitkuma <amitkuma@redhat.com>
Thu, 21 Sep 2017 14:16:23 +0000 (19:46 +0530)
committeramitkuma <amitkuma@redhat.com>
Thu, 21 Sep 2017 14:16:23 +0000 (19:46 +0530)
** 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 <amitkuma@redhat.com>
src/rgw/rgw_rest.cc

index 27cdaf1353e6c745c934a19b27af1f04c9f218a1..5963d40cbb47590aa1389a81df0dba1c60ca0292 100644 (file)
@@ -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;