Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
|
inline
| side by side (parent:
427ce22
)
Free the temporary vector
80/180/2
author
Robert Varga
<nite@hq.sk>
Mon, 1 Feb 2016 17:33:38 +0000
(18:33 +0100)
committer
Robert Varga
<nite@hq.sk>
Mon, 1 Feb 2016 17:42:53 +0000
(18:42 +0100)
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>
vpp-japi/japi/vppjni.c
patch
|
blob
|
history
diff --git
a/vpp-japi/japi/vppjni.c
b/vpp-japi/japi/vppjni.c
index
f7047bb
..
83090cf
100644
(file)
--- 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);
(*env)->SetIntArrayRegion(env, bdidArray, 0, vec_len(buf), (int*)buf);
+ vec_free(buf);
+
return bdidArray;
}
return bdidArray;
}