[open-ils-commits] r12217 - trunk/Open-ILS/src/c-apps (scottmk)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 18 02:51:43 EST 2009
Author: scottmk
Date: 2009-02-18 02:51:39 -0500 (Wed, 18 Feb 2009)
New Revision: 12217
Modified:
trunk/Open-ILS/src/c-apps/oils_cstore.c
Log:
searchJOIN() was segfaulting when the FROM clause was of
the form "from": { "xxx":"yyy" }. Reason: we were
freeing freeable_hash prematurely. Fixed.
Modified: trunk/Open-ILS/src/c-apps/oils_cstore.c
===================================================================
--- trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-02-18 04:55:26 UTC (rev 12216)
+++ trunk/Open-ILS/src/c-apps/oils_cstore.c 2009-02-18 07:51:39 UTC (rev 12217)
@@ -2028,8 +2028,6 @@
jsonObject* snode = NULL;
jsonIterator* search_itr = jsonNewIterator( working_hash );
- if(freeable_hash)
- jsonObjectFree(freeable_hash);
while ( (snode = jsonIteratorNext( search_itr )) ) {
osrfHash* idlClass = osrfHashGet( oilsIDL(), search_itr->key );
@@ -2051,6 +2049,8 @@
leftclass
);
buffer_free(join_buf);
+ if(freeable_hash)
+ jsonObjectFree(freeable_hash);
free(field);
jsonIteratorFree(search_itr);
return NULL;
@@ -2069,6 +2069,8 @@
class
);
buffer_free(join_buf);
+ if(freeable_hash)
+ jsonObjectFree(freeable_hash);
free(fkey);
jsonIteratorFree(search_itr);
return NULL;
@@ -2115,6 +2117,8 @@
class
);
buffer_free(join_buf);
+ if(freeable_hash)
+ jsonObjectFree(freeable_hash);
jsonIteratorFree(search_itr);
return NULL;
}
@@ -2176,7 +2180,9 @@
free(field);
}
- jsonIteratorFree(search_itr);
+ if(freeable_hash)
+ jsonObjectFree(freeable_hash);
+ jsonIteratorFree(search_itr);
return buffer_release(join_buf);
}
More information about the open-ils-commits
mailing list