[Groonga-commit] groonga/groonga at a73f35b [master] proc_fuzzy_search: fix memory leak when memory couldn't allocated

Back to archive index

naoa null+****@clear*****
Sun Feb 7 02:57:39 JST 2016


naoa	2016-02-07 02:57:39 +0900 (Sun, 07 Feb 2016)

  New Revision: a73f35b0c660ba9abe1642bad675381d0e332b37
  https://github.com/groonga/groonga/commit/a73f35b0c660ba9abe1642bad675381d0e332b37

  Merged 83b9a57: Merge pull request #471 from naoa/proc-fuzzy-fix-memory-leak

  Message:
    proc_fuzzy_search: fix memory leak when memory couldn't allocated

  Modified files:
    lib/proc/proc_fuzzy_search.c

  Modified: lib/proc/proc_fuzzy_search.c (+2 -0)
===================================================================
--- lib/proc/proc_fuzzy_search.c    2016-02-06 23:18:03 +0900 (2adde8b)
+++ lib/proc/proc_fuzzy_search.c    2016-02-07 02:57:39 +0900 (b39e82e)
@@ -176,6 +176,8 @@ sequential_fuzzy_search(grn_ctx *ctx, grn_obj *table, grn_obj *column, grn_obj *
 
     heap = score_heap_open(ctx, SCORE_HEAP_SIZE);
     if (!heap) {
+      grn_table_cursor_close(ctx, tc);
+      grn_obj_unlink(ctx, &value);
       return GRN_NO_MEMORY_AVAILABLE;
     }
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index