Skip to content

Commit

Permalink
HADOOP-17209. Erasure Coding: Native library memory leak. Contriubted…
Browse files Browse the repository at this point in the history
… by Sean Chow
  • Loading branch information
S O'Donnell committed Aug 24, 2020
1 parent 5c927eb commit 17cd8a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ void getInputs(JNIEnv *env, jobjectArray inputs, jintArray inputOffsets,
destInputs[i] = NULL;
}
}
(*env)->ReleaseIntArrayElements(env, inputOffsets, tmpInputOffsets, 0);
}

void getOutputs(JNIEnv *env, jobjectArray outputs, jintArray outputOffsets,
Expand All @@ -112,4 +113,5 @@ void getOutputs(JNIEnv *env, jobjectArray outputs, jintArray outputOffsets,
byteBuffer));
destOutputs[i] += tmpOutputOffsets[i];
}
}
(*env)->ReleaseIntArrayElements(env, outputOffsets, tmpOutputOffsets, 0);
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jintArray outputOffsets) {

decode(&rsDecoder->decoder, rsDecoder->inputs, tmpErasedIndexes,
numErased, rsDecoder->outputs, chunkSize);
(*env)->ReleaseIntArrayElements(env, erasedIndexes, tmpErasedIndexes, 0);
}

JNIEXPORT void JNICALL
Expand Down

0 comments on commit 17cd8a1

Please sign in to comment.