Fixed a memory leak for java STRING_ARRAY

The allocation loop uses size, so the free loop should do the same,
not size-1.
This commit is contained in:
Gavin Kinsey 2013-09-19 12:21:57 +01:00 • committed by William S Fulton
commit 43032339d0

View file

@ -52,7 +52,7 @@
%typemap(freearg) char **STRING_ARRAY {
int i;
for (i=0; i<size$argnum-1; i++)
for (i=0; i<size$argnum; i++)
#ifdef __cplusplus
delete[] $1[i];
delete[] $1;