HADOOP-17209. Erasure Coding: Native library memory leak. Contriubted by Sean Chow
This commit is contained in:
parent
5c927eb550
commit
17cd8a1b16
@ -92,6 +92,7 @@ void getInputs(JNIEnv *env, jobjectArray inputs, jintArray inputOffsets,
|
|||||||
destInputs[i] = NULL;
|
destInputs[i] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
(*env)->ReleaseIntArrayElements(env, inputOffsets, tmpInputOffsets, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void getOutputs(JNIEnv *env, jobjectArray outputs, jintArray outputOffsets,
|
void getOutputs(JNIEnv *env, jobjectArray outputs, jintArray outputOffsets,
|
||||||
@ -112,4 +113,5 @@ void getOutputs(JNIEnv *env, jobjectArray outputs, jintArray outputOffsets,
|
|||||||
byteBuffer));
|
byteBuffer));
|
||||||
destOutputs[i] += tmpOutputOffsets[i];
|
destOutputs[i] += tmpOutputOffsets[i];
|
||||||
}
|
}
|
||||||
|
(*env)->ReleaseIntArrayElements(env, outputOffsets, tmpOutputOffsets, 0);
|
||||||
}
|
}
|
@ -66,6 +66,7 @@ jintArray outputOffsets) {
|
|||||||
|
|
||||||
decode(&rsDecoder->decoder, rsDecoder->inputs, tmpErasedIndexes,
|
decode(&rsDecoder->decoder, rsDecoder->inputs, tmpErasedIndexes,
|
||||||
numErased, rsDecoder->outputs, chunkSize);
|
numErased, rsDecoder->outputs, chunkSize);
|
||||||
|
(*env)->ReleaseIntArrayElements(env, erasedIndexes, tmpErasedIndexes, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL
|
JNIEXPORT void JNICALL
|
||||||
|
Loading…
Reference in New Issue
Block a user