prosyslab-classroom / cs348-information-security

60 stars 10 forks source link

[Announcement] Homework 6 template update #329

Closed yeonhee-ryou closed 1 year ago

yeonhee-ryou commented 1 year ago

Hi, all

There is a resource leak issue in the homework 6 template. (Thanks @m-spitfire ! #327) Please apply the following patch to src/coverage.ml:

--- a/src/coverage.ml
+++ b/src/coverage.ml
@@ -24,4 +24,5 @@ let read coverage_file =
       (if count > 0 then add line_number coverage else coverage) |> loop ic
     with End_of_file -> coverage
   in
-  loop ic empty
+  let cov = loop ic empty in
+  close_in ic; cov
gayeun4195 commented 1 year ago

Can I know how to apply the above patch to my GitHub repository? I'm not familiar with git. Thank you for the answer in advance:)

gayeun4195 commented 1 year ago

I did it manually by modifying my code.