[Groonga-commit] groonga/groonga at 93fee92 [fix-crash-by-lock-clear-against-temporary-database] 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: 93fee92f428b6d956f495b0898287c5eeb2df595
  https://github.com/groonga/groonga/commit/93fee92f428b6d956f495b0898287c5eeb2df595

  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-07 13:52:00 +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����������������������������...
下載 



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