File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 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");
830830
831831void * PQconninfoParse (const char * , char * * );
832832void PQconninfoFree (void * );
833+ void PQfreemem (void * ptr );
833834typedef void * (* PQCONNINFOPARSEPROC )(const char * , char * * );
834835typedef void (* PQCONNINFOFREEPROC )(void * );
836+ typedef void (* PQFREEMEMPROC )(void * );
835837static int
836838ds_options3_update (HWND hdlg , ConnInfo * ci )
837839{
@@ -841,6 +843,7 @@ ds_options3_update(HWND hdlg, ConnInfo *ci)
841843 HMODULE hmodule ;
842844 PQCONNINFOPARSEPROC pproc = NULL ;
843845 PQCONNINFOFREEPROC fproc = NULL ;
846+ PQFREEMEMPROC fmproc = NULL ;
844847
845848 MYLOG (0 , "entering got ci=%p\n" , ci );
846849
@@ -854,8 +857,10 @@ ds_options3_update(HWND hdlg, ConnInfo *ci)
854857 const char * logmsg = "libpq parameter error" ;
855858
856859 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+ }
859864 FreeLibrary (hmodule );
860865
861866 return 1 ;
You can’t perform that action at this time.
0 commit comments