From: Robert Varga Date: Mon, 1 Feb 2016 17:33:38 +0000 (+0100) Subject: Free the temporary vector X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=7a224a0075a4d46e35c2507b893bcba7c866a9b2;p=odp4vpp.git Free the temporary vector vec_add1() seems to be allocating memory which we do not free. Correct that. Change-Id: I25dca1871121cdd11a218ff2289a3c51b42e843b Signed-off-by: Robert Varga --- diff --git a/vpp-japi/japi/vppjni.c b/vpp-japi/japi/vppjni.c index f7047bb0..83090cf2 100644 --- a/vpp-japi/japi/vppjni.c +++ b/vpp-japi/japi/vppjni.c @@ -901,6 +901,8 @@ static jintArray create_array_of_bd_ids(JNIEnv * env, jint bd_id) (*env)->SetIntArrayRegion(env, bdidArray, 0, vec_len(buf), (int*)buf); + vec_free(buf); + return bdidArray; }