Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

gjiten-2.6-radical-patch.diff

By: kafkafuura on Oct 16th, 2012  |  syntax: Diff  |  size: 0.57 KB  |  views: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. --- kanjidic.c  2006-10-29 11:17:36.000000000 -0600
  2. +++ kanjidic.c  2012-10-16 19:23:16.045662146 -0500
  3. @@ -795,6 +795,8 @@
  4.      error = TRUE;
  5.    }
  6.    radkfile = (gchar *) mmap(NULL, radkfile_size, PROT_READ, MAP_SHARED, fd, 0);
  7. +  close(fd);
  8. +
  9.    if (radkfile == NULL) gjiten_abort_with_msg("mmap() failed for radkfile\n");
  10.  
  11.    if (error == TRUE) {
  12. @@ -946,6 +948,8 @@
  13.                 KanjiDic *tmp;
  14.                 radical_window_close();
  15.  
  16. +    if(!munmap(radkfile,radkfile_size))radkfile=NULL; //release radkfile mmap
  17. +
  18.                 /* Avoid recursion */
  19.                 tmp = kanjiDic;
  20.                 kanjiDic = NULL;