File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -830,8 +830,10 @@ MYLOG(0, "entering\n");
830
830
831
831
void * PQconninfoParse (const char * , char * * );
832
832
void PQconninfoFree (void * );
833
+ void PQfreemem (void * ptr );
833
834
typedef void * (* PQCONNINFOPARSEPROC )(const char * , char * * );
834
835
typedef void (* PQCONNINFOFREEPROC )(void * );
836
+ typedef void (* PQFREEMEMPROC )(void * );
835
837
static int
836
838
ds_options3_update (HWND hdlg , ConnInfo * ci )
837
839
{
@@ -841,6 +843,7 @@ ds_options3_update(HWND hdlg, ConnInfo *ci)
841
843
HMODULE hmodule ;
842
844
PQCONNINFOPARSEPROC pproc = NULL ;
843
845
PQCONNINFOFREEPROC fproc = NULL ;
846
+ PQFREEMEMPROC fmproc = NULL ;
844
847
845
848
MYLOG (0 , "entering got ci=%p\n" , ci );
846
849
@@ -854,8 +857,10 @@ ds_options3_update(HWND hdlg, ConnInfo *ci)
854
857
const char * logmsg = "libpq parameter error" ;
855
858
856
859
MessageBox (hdlg , ermsg ? ermsg : "memory over?" , logmsg , MB_ICONEXCLAMATION | MB_OK );
857
- if (NULL != ermsg )
858
- free (ermsg );
860
+ if (NULL != ermsg ) {
861
+ fmproc = (PQFREEMEMPROC )GetProcAddress (hmodule , "PQfreemem" );
862
+ (* fmproc )(ermsg );
863
+ }
859
864
FreeLibrary (hmodule );
860
865
861
866
return 1 ;
You can’t perform that action at this time.
0 commit comments