commit | 86b27228bfcb04184fe963d56f38494f52bcf402 | [log] [tgz] |
---|---|---|
author | Kuang Fangjun <csukuangfj@gmail.com> | Sun Sep 23 08:41:09 2018 +0800 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Sun Sep 23 03:01:49 2018 +0000 |
tree | ea48caf0af6dd0f775be7072625c0aa7cfc69df8 | |
parent | 189f0c2f6efd07c3976953a5c278dbb5f263183b [diff] |
close the file on return. See https://github.com/ceres-solver/ceres-solver/issues/425 Change-Id: I7d02a07d36608c25db191de31f47f19b33962040
diff --git a/internal/ceres/bundle_adjustment_test_util.h b/internal/ceres/bundle_adjustment_test_util.h index 0926204..7e076eb 100644 --- a/internal/ceres/bundle_adjustment_test_util.h +++ b/internal/ceres/bundle_adjustment_test_util.h
@@ -128,6 +128,8 @@ for (int i = 0; i < num_parameters_; ++i) { FscanfOrDie(fptr, "%lf", parameters_ + i); } + + fclose(fptr); } void BuildProblem() { @@ -142,7 +144,7 @@ new BundlerResidual(observations_[2*i + 0], observations_[2*i + 1])); - // Each observation correponds to a pair of a camera and a point + // Each observation corresponds to a pair of a camera and a point // which are identified by camera_index()[i] and // point_index()[i] respectively. double* camera = cameras + 9 * camera_index_[i];