[Groonga-commit] groonga/groonga at e502dbd [master] Add NULL check

Back to archive index

Kouhei Sutou null+****@clear*****
Wed May 11 11:02:47 JST 2016


Kouhei Sutou	2016-05-11 11:02:47 +0900 (Wed, 11 May 2016)

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

  Message:
    Add NULL check

  Modified files:
    lib/db.c

  Modified: lib/db.c (+4 -0)
===================================================================
--- lib/db.c    2016-05-11 11:00:47 +0900 (2a1070b)
+++ lib/db.c    2016-05-11 11:02:47 +0900 (234d137)
@@ -650,6 +650,10 @@ grn_obj_io(grn_obj *obj)
 uint32_t
 grn_db_get_last_modified(grn_ctx *ctx, grn_obj *db)
 {
+  if (!db) {
+    return 0;
+  }
+
   return grn_obj_io(db)->header->last_modified;
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



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