*** a/src/backend/access/common/heaptuple.c --- b/src/backend/access/common/heaptuple.c *************** *** 801,806 **** heap_formtuple(TupleDesc tupleDescriptor, --- 801,808 ---- tuple = heap_form_tuple(tupleDescriptor, values, boolNulls); + pfree(boolNulls); + return tuple; } *************** *** 894,899 **** heap_modifytuple(HeapTuple tuple, --- 896,902 ---- { int numberOfAttributes = tupleDesc->natts; int attnum; + HeapTuple result; bool *replNulls = (bool *) palloc(numberOfAttributes * sizeof(bool)); bool *replActions = (bool *) palloc(numberOfAttributes * sizeof(bool)); *************** *** 903,909 **** heap_modifytuple(HeapTuple tuple, replActions[attnum] = replCharActions[attnum] == 'r'; } ! return heap_modify_tuple(tuple, tupleDesc, replValues, replNulls, replActions); } /* --- 906,917 ---- replActions[attnum] = replCharActions[attnum] == 'r'; } ! result = heap_modify_tuple(tuple, tupleDesc, replValues, replNulls, replActions); ! ! pfree(replNulls); ! pfree(replActions); ! ! return result; } /* *************** *** 1051,1056 **** heap_deformtuple(HeapTuple tuple, --- 1059,1066 ---- charNulls[attnum] = boolNulls[attnum] ? 'n' : ' '; } + pfree(boolNulls); + } /*