Skip to content

Commit 71fa028

Browse files
authored
Merge pull request #54 from flightaware/FT-10969
Fix memory leak in build_param_array and in expand_parameters
2 parents 6fedc4e + d8fd256 commit 71fa028

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/mac-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
- name: Install dependencies
1717
run: |
1818
brew update
19-
brew install tcl-tk autoconf libpq
19+
brew install tcl-tk@8 autoconf libpq
2020
- name: configure
2121
run: |
2222
autoreconf -vi
2323
export PG_CONFIG=/opt/homebrew/opt/libpq/bin/pg_config
24-
./configure --with-tcl=/opt/homebrew/opt/tcl-tk/lib/ --prefix=/usr/local
24+
./configure --with-tcl=/opt/homebrew/opt/tcl-tk@8/lib/ --prefix=/usr/local
2525
- name: make
2626
run: make
2727
- name: install

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dnl to configure the system for the local environment.
1919
# so you can encode the package version directly into the source files.
2020
#-----------------------------------------------------------------------
2121

22-
AC_INIT([pgtcl], [3.1.0])
22+
AC_INIT([pgtcl], [3.1.1])
2323

2424
#-----
2525
# Version with patch stripped

generic/pgtclCmds.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ int build_param_array(Tcl_Interp *interp, int nParams, Tcl_Obj *CONST objv[], co
629629
}
630630

631631
*paramValuesPtr = paramValues;
632+
ckfree(paramLengths);
632633

633634
return TCL_OK;
634635
}
@@ -2927,6 +2928,7 @@ static int expand_parameters(Tcl_Interp *interp, const char *queryString, int nP
29272928
// Normal return, push parameters and return OK.
29282929
*paramValuesPtr = paramValues;
29292930
*newQueryStringPtr = newQueryString;
2931+
ckfree(paramLengths);
29302932
return TCL_OK;
29312933

29322934
error_return:

0 commit comments

Comments
 (0)