From: miker Date: Wed, 17 Dec 2008 20:34:06 +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=72e45b56f168a8b57949d0a9fd678a19823204e0;p=Evergreen.git clone the object instead of serializing and then parsing git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11608 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 ae10adb9d3..bfab8b8097 100644 --- a/Open-ILS/src/c-apps/oils_cstore.c +++ b/Open-ILS/src/c-apps/oils_cstore.c @@ -998,6 +998,7 @@ static jsonObject* doRetrieve(osrfMethodContext* ctx, int* err ) { osrfHashGet(meta, "fieldmapper"), id ); + free(id); jsonObject* fake_params = jsonNewObjectType(JSON_ARRAY); jsonObjectPush(fake_params, jsonNewObjectType(JSON_HASH)); @@ -1005,10 +1006,9 @@ static jsonObject* doRetrieve(osrfMethodContext* ctx, int* err ) { jsonObjectSetKey( jsonObjectGetIndex(fake_params, 0), osrfHashGet(meta, "primarykey"), - jsonParseString(id) + jsonObjectClone(jsonObjectGetIndex(ctx->params, id_pos)) ); - free(id); if (order_hash) jsonObjectPush(fake_params, jsonObjectClone(order_hash) );