rem: Tcl_DecrRefCount(keylistPtr);
context: Tcl_GetKeyedListKeys(interp, subFieldName, keyedList, keyesArgcPtr,keyesArgvPtr)    Tcl_Interp     *interp;    CONST char     *subFieldName;    CONST char     *keyedList;    int            *keyesArgcPtr;    char         ***keyesArgvPtr;{    Tcl_Obj *keylistPtr = Tcl_NewStringObj(keyedList, -1);    char    *keylistKey = (char*)subFieldName;    Tcl_Obj *objValPtr;    int status;    Tcl_IncrRefCount(keylistPtr);    status = TclX_KeyedListGetKeys(interp, keylistPtr, keylistKey, &objValPtr);    Tcl_DecrRefCount(keylistPtr);    if (status == TCL_BREAK) {        if (keyesArgcPtr) {            *keyesArgcPtr = 0;        }        if (keyesArgvPtr) {            *keyesArgvPtr = NULL;        }    } else if (status == TCL_OK) {        if (keyesArgcPtr && keyesArgvPtr) {            unsigned int keySize = 0, totalKeySize = 0;            int ii, keyCount;            char **keyArgv, *keyPtr, *nextByte;            Tcl_Obj **objValues;            if (Tcl_ListObjGetElements(interp, objValPtr, &keyCount,                                       &objValues) != TCL_OK) {                return TCL_ERROR;            }            for (ii = 0; ii < keyCount; ii++) {                keyPtr = Tcl_GetStringFromObj(objValues[ii], &keySize);                totalKeySize += keySize + 1;            }            keyArgv = (char**)ckalloc(((keyCount+1)*sizeof(char*))+totalKeySize);            keyArgv[keyCount] = NULL;            nextByte = ((char*)keyArgv) + ((keyCount+1) * sizeof(char*));            for (ii = 0; ii < keyCount; ii++) {                keyArgv[ii] = nextByte;                keyPtr = Tcl_GetStringFromObj(objValues[ii], &keySize);                strncpy(nextByte, keyPtr, keySize);                nextByte[keySize] = 0;                nextByte += keySize + 1;            }            *keyesArgcPtr = keyCount;            *keyesArgvPtr = keyArgv;        }        Tcl_DecrRefCount(objValPtr);    }    return status;}