1. 20 Oct, 2020 1 commit
  2. 19 Oct, 2020 2 commits
    • Fletcher Woodruff's avatar
      test: do not leak initial values of string options · 6fe222ed
      Fletcher Woodruff authored
      The default values for string options are set using static (i.e.
      non-malloced) strings. Later, if new values are loaded from the config
      file, those SANE_Strings will then point to dynamically allocated memory
      which is eventually leaked.
      
      Change the initial values for the string options to NULL, and initialize
      them to the proper values within sane_init() using strdup(). This way,
      whenever the value for the string is changed, we can safely free() the
      previous value.
      
      This eliminates the other main source of memory leaks in the test backend.
      
      This patch also updates sane_init for the test backend to properly cleanup
      memory if it fails.
      6fe222ed
    • Fletcher Woodruff's avatar
      test: free memory used for string options · f71ac612
      Fletcher Woodruff authored
      Inside Test_Device, track whether we've already called init_options().
      If we have, don't call it again when calling sane_open() again.
      
      Add a function cleanup_options() which frees the memory used for these
      options, and call it in sane_exit() if we previously called
      init_options().
      
      Change Test_Devices to be initialized with calloc instead of malloc,
      so that we can assume that uninitialized fields are NULL, and can safely
      call free() on them unconditionally.
      
      This eliminates some larger memory leaks within the test backend.
      f71ac612
  3. 18 Oct, 2020 3 commits
  4. 15 Oct, 2020 1 commit
  5. 13 Oct, 2020 1 commit
  6. 12 Oct, 2020 2 commits
  7. 10 Oct, 2020 4 commits
  8. 09 Oct, 2020 1 commit
  9. 07 Oct, 2020 2 commits
  10. 03 Oct, 2020 1 commit
  11. 29 Sep, 2020 1 commit
  12. 28 Sep, 2020 2 commits
  13. 27 Sep, 2020 1 commit
  14. 26 Sep, 2020 5 commits
  15. 25 Sep, 2020 4 commits
  16. 24 Sep, 2020 3 commits
  17. 22 Sep, 2020 1 commit
  18. 18 Sep, 2020 3 commits
  19. 17 Sep, 2020 2 commits