Norbert: I was just reading a post:
http://www.daniweb.com/forums/thread141502.html# and I look at openDBX
code.
Suppose this case (as I think I am having in sqlite in windows):
1) I call odbx_init
2) odbx_init inside, calls to: _odbx_lib_open
3) The foading of the backend library went perfect.
4) Then, after that if, I do this:
if( ( odbxreg = (regfunc) GetProcAddress( (HMODULE) handle->backend,
"odbxdrv_register" ) ) == NULL )
{
return -ODBX_ERR_NOOP;
}
5) suppose that function returns null, so -ODBX_ERR_NOOP is returned.
6) we come back where _odbx_lib_open was called in odbx_init and we see:
if( ( err = _odbx_lib_open( *handle, backend ) ) < 0 )
{
free( *handle );
return err;
}
7) I will free handle and return. But, FreeLibrary was never called.
Actually, _odbx_lib_close() was never called.
So, my question is, shouldn't the if be something like this:
if( ( err = _odbx_lib_open( *handle, backend ) ) < 0 )
{
_odbx_lib_close( *handle );
free( *handle );
return err;
}
Cheers,
Mariano
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
libopendbx-devel mailing list
libopendbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libopendbx-devel
http://www.linuxnetworks.de/doc/index.php/OpenDBX