summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Varga <nite@hq.sk>2016-02-01 18:33:38 +0100
committerRobert Varga <nite@hq.sk>2016-02-01 18:42:53 +0100
commit7a224a0075a4d46e35c2507b893bcba7c866a9b2 (patch)
tree29132558c7d43642e1d20490ce7b2f2190a57f66
parent427ce225831af2959349c5e0332019433e8bf95f (diff)
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 <nite@hq.sk>
-rw-r--r--vpp-japi/japi/vppjni.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vpp-japi/japi/vppjni.c b/vpp-japi/japi/vppjni.c
index f7047bb0c81..83090cf2e74 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;
}