From 6c3b09443dc44470609d2e9c81d2f17ad2ce925b Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 17 Dec 2008 20:25:17 +0000 Subject: [PATCH] clone the object instead of serializing and then parsing git-svn-id: svn://svn.open-ils.org/ILS/trunk@11607 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/c-apps/oils_cstore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/c-apps/oils_cstore.c b/Open-ILS/src/c-apps/oils_cstore.c index 40aee2d7d0..7bf66883d1 100644 --- a/Open-ILS/src/c-apps/oils_cstore.c +++ b/Open-ILS/src/c-apps/oils_cstore.c @@ -1459,6 +1459,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)); @@ -1466,10 +1467,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) ); -- 2.11.0