[Groonga-commit] groonga/groonga at 5119df4 [master] Fix a crash bug by lock_clear against temporary database

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 7 17:35:06 JST 2017


Kouhei Sutou	2017-02-07 17:35:06 +0900 (Tue, 07 Feb 2017)

  New Revision: 5119df4aa09f0a84d309550841c8f7a1bad0a23c
  https://github.com/groonga/groonga/commit/5119df4aa09f0a84d309550841c8f7a1bad0a23c

  Message:
    Fix a crash bug by lock_clear against temporary database
    
        % groonga
        > lock_clear
        (crash)

  Modified files:
    lib/db.c

  Modified: lib/db.c (+6 -1)
===================================================================
--- lib/db.c    2017-02-09 13:40:15 +0900 (d518c37)
+++ lib/db.c    2017-02-07 17:35:06 +0900 (1b1d0c8)
@@ -11317,7 +11317,12 @@ grn_obj_clear_lock(grn_ctx *ctx, grn_obj *obj)
       }
     }
     grn_io_clear_lock(grn_obj_io(obj));
-    grn_obj_clear_lock(ctx, (grn_obj *)(((grn_db *)obj)->specs));
+    {
+      grn_db *db = (grn_db *)obj;
+      if (db->specs) {
+        grn_obj_clear_lock(ctx, (grn_obj *)(db->specs));
+      }
+    }
     break;
   case GRN_TABLE_NO_KEY :
     grn_array_queue_lock_clear(ctx, (grn_array *)obj);
-------------- next part --------------
HTML����������������������������...
Download 



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