[Groonga-commit] groonga/groonga at 2ff1445 [master] Add missing error check

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jan 29 17:50:51 JST 2016


Kouhei Sutou	2016-01-29 17:50:51 +0900 (Fri, 29 Jan 2016)

  New Revision: 2ff144506bc57388728dfdd6a817beb2bec779ac
  https://github.com/groonga/groonga/commit/2ff144506bc57388728dfdd6a817beb2bec779ac

  Message:
    Add missing error check
    
    GitHub: fix #332
    
    Reported by Masafumi Yokoyama. Thanks!!!

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+5 -1)
===================================================================
--- lib/proc.c    2016-01-28 19:52:34 +0900 (cbd5b5b)
+++ lib/proc.c    2016-01-29 17:50:51 +0900 (7d2d6a6)
@@ -564,7 +564,11 @@ grn_select_output_columns(grn_ctx *ctx, grn_obj *res,
     GRN_OBJ_FORMAT_WITH_COLUMN_NAMES|
     GRN_OBJ_FORMAT_XML_ELEMENT_RESULTSET;
   rc = grn_output_format_set_columns(ctx, &format, res, columns, columns_len);
-  /* TODO: check rc */
+  if (rc != GRN_SUCCESS) {
+    GRN_OBJ_FORMAT_FIN(ctx, &format);
+    return;
+  }
+
   if (format.expression) {
     grn_obj *condition_ptr;
     condition_ptr =
-------------- next part --------------
HTML����������������������������...
Download 



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