]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: Update cpp.rst to fix bug in demo code 22162/head
authorZhanhao (Jasper) Liu <jasperlau95@gmail.com>
Thu, 7 Jun 2018 07:56:09 +0000 (15:56 +0800)
committerGitHub <noreply@github.com>
Thu, 7 Jun 2018 07:56:09 +0000 (15:56 +0800)
Update cpp.rst to fix the possible problems brought by not closing the FILE pointer properly in the demo code.

Signed-off-by: Zhanhao Liu <jasperlau95@gmail.com>
doc/radosgw/s3/cpp.rst

index a96fc7549e77065d6adcf7232cac9110dfc196b7..089c9c53a304495d8e6504c6bb1cd001e60d87d3 100644 (file)
@@ -240,6 +240,7 @@ This creates a file ``hello.txt``.
        };
 
        S3_put_object(&bucketContext, sample_key, contentLength, NULL, NULL, 0, &putObjectHandler, &data);
+       fclose(data.infile);
 
 
 Download an Object (to a file)