From: miker Date: Wed, 17 Dec 2008 20:38:23 +0000 (+0000) Subject: clone the object instead of serializing and then parsing X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9992a2ad08b3e929ecf8c6876ed62c875839022c;p=Evergreen.git clone the object instead of serializing and then parsing git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@11609 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/c-apps/oils_cstore.c b/Open-ILS/src/c-apps/oils_cstore.c index d66d5e3e3e..9d03b0c0f4 100644 --- a/Open-ILS/src/c-apps/oils_cstore.c +++ b/Open-ILS/src/c-apps/oils_cstore.c @@ -925,6 +925,7 @@ jsonObject* doRetrieve(osrfMethodContext* ctx, int* err ) { osrfHashGet(meta, "fieldmapper"), id ); + free(id); jsonObject* fake_params = jsonParseString("[]"); jsonObjectPush(fake_params, jsonParseString("{}")); @@ -932,7 +933,7 @@ jsonObject* doRetrieve(osrfMethodContext* ctx, int* err ) { jsonObjectSetKey( jsonObjectGetIndex(fake_params, 0), osrfHashGet(meta, "primarykey"), - jsonParseString(id) + jsonObjectClone(jsonObjectGetIndex(ctx->params, 0)) ); if (order_hash) jsonObjectPush(fake_params, jsonObjectClone(order_hash) );