Commits

Peter Szilagyi  committed cdbaa2c

Fixed a probable C memory leak found by mstanojevic.

  • Participants
  • Parent commits 0e791dc

Comments (0)

Files changed (1)

File ocaml/omake/server.ml

     let fd = Inotify.init () in
     Clock.every (Time.Span.of_sec 3.) (fun () ->
       match Result.try_with (fun () -> Inotify.add_watch fd "/" Inotify.([S_All])) with
-      | Ok _wd ->
+      | Ok wd ->
+        Inotify.rm_watch fd wd;
         Emacs.Async.send_all "(Omake.Inotify.ok)"
       (* XCR seanmcl for sweeks: The translation from errno labels to
          a data type has already been done in core_unix.  Should we expose a