diff options
author | Robert Varga <nite@hq.sk> | 2016-02-01 18:33:38 +0100 |
---|---|---|
committer | Robert Varga <nite@hq.sk> | 2016-02-01 18:42:53 +0100 |
commit | 7a224a0075a4d46e35c2507b893bcba7c866a9b2 (patch) | |
tree | 29132558c7d43642e1d20490ce7b2f2190a57f66 /vpp-japi/japi/vppjni.c | |
parent | 427ce225831af2959349c5e0332019433e8bf95f (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>
Diffstat (limited to 'vpp-japi/japi/vppjni.c')
-rw-r--r-- | vpp-japi/japi/vppjni.c | 2 |
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; } |