[Groonga-commit] groonga/groonga at 5a348ae [master] Add missing NULL check

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Oct 8 15:35:39 JST 2015


Kouhei Sutou	2015-10-08 15:35:39 +0900 (Thu, 08 Oct 2015)

  New Revision: 5a348ae125342ac31dcd86fbe81e3624091b6cde
  https://github.com/groonga/groonga/commit/5a348ae125342ac31dcd86fbe81e3624091b6cde

  Message:
    Add missing NULL check
    
    grn_db::specs is NULL for temporary database.

  Modified files:
    lib/db.c

  Modified: lib/db.c (+1 -1)
===================================================================
--- lib/db.c    2015-10-08 15:30:10 +0900 (a7c00e7)
+++ lib/db.c    2015-10-08 15:35:39 +0900 (549b996)
@@ -10281,7 +10281,7 @@ grn_obj_flush(grn_ctx *ctx, grn_obj *obj)
     {
       grn_db *db = (grn_db *)obj;
       rc = grn_obj_flush(ctx, db->keys);
-      if (rc == GRN_SUCCESS) {
+      if (rc == GRN_SUCCESS && db->specs) {
         rc = grn_obj_flush(ctx, (grn_obj *)(db->specs));
       }
     }
-------------- next part --------------
HTML����������������������������...
Download 



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