]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-fuse: Fix Segmentation fault --localize-reads 20908/head
authorJos Collin <jcollin@redhat.com>
Thu, 15 Mar 2018 04:14:04 +0000 (09:44 +0530)
committerJos Collin <jcollin@redhat.com>
Sat, 17 Mar 2018 12:12:42 +0000 (17:42 +0530)
Fixes: http://tracker.ceph.com/issues/23288
Signed-off-by: Jos Collin <jcollin@redhat.com>
src/ceph_fuse.cc

index 6e2d21792f605f95812150684a9494d15125d018..c2a14a86d3da4eb4552f9ca0c85fce017659c8bf 100644 (file)
@@ -87,9 +87,7 @@ int main(int argc, const char **argv, const char *envp[]) {
                         CODE_ENVIRONMENT_DAEMON,
                         CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS);
 
-  auto i = args.begin();
-  auto end = args.end();
-  for (; i != end;) {
+  for (auto i = args.begin(); i != args.end();) {
     if (ceph_argparse_double_dash(args, i)) {
       break;
     } else if (ceph_argparse_flag(args, i, "--localize-reads", (char*)nullptr)) {