[open-ils-commits] r13158 - trunk/Open-ILS/src/c-apps (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu May 14 07:24:59 EDT 2009
Author: scottmk
Date: 2009-05-14 07:24:59 -0400 (Thu, 14 May 2009)
New Revision: 13158
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
In searchJOIN(): abort if recursive call fails.
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-05-14 00:23:24 UTC (rev 13157)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-05-14 11:24:59 UTC (rev 13158)
@@ -2396,9 +2396,18 @@
const jsonObject* join_filter = jsonObjectGetKeyConst( snode, "join" );
if (join_filter) {
char* jpred = searchJOIN( join_filter, idlClass );
- OSRF_BUFFER_ADD_CHAR( join_buf, ' ' );
- OSRF_BUFFER_ADD( join_buf, jpred );
- free(jpred);
+ if( jpred ) {
+ OSRF_BUFFER_ADD_CHAR( join_buf, ' ' );
+ OSRF_BUFFER_ADD( join_buf, jpred );
+ free(jpred);
+ } else {
+ osrfLogError( OSRF_LOG_MARK, "%s: Invalid nested join.", MODULENAME );
+ jsonIteratorFree( search_itr );
+ buffer_free( join_buf );
+ if( freeable_hash )
+ jsonObjectFree( freeable_hash );
+ return NULL;
+ }
}
}
More information about the open-ils-commits
mailing list