if VALGRIND is defined, do not unload the driver.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14852 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -248,7 +248,9 @@ foreach_func (const char *filename, lt_ptr data)
|
||||
}
|
||||
|
||||
result = lib_list (list);
|
||||
#if !defined(VALGRIND)
|
||||
lt_dlclose (lh);
|
||||
#endif
|
||||
if (result < 0) {
|
||||
gp_log (GP_LOG_DEBUG, "gphoto2-port-info-list",
|
||||
_("Could not load port driver list: '%s'."),
|
||||
|
||||
@@ -167,8 +167,10 @@ gp_port_set_info (GPPort *port, GPPortInfo info)
|
||||
port->pc->ops = NULL;
|
||||
}
|
||||
if (port->pc->lh) {
|
||||
#if !defined(VALGRIND)
|
||||
lt_dlclose (port->pc->lh);
|
||||
lt_dlexit ();
|
||||
#endif
|
||||
}
|
||||
|
||||
lt_dlinit ();
|
||||
@@ -348,8 +350,10 @@ gp_port_free (GPPort *port)
|
||||
}
|
||||
|
||||
if (port->pc->lh) {
|
||||
#if !defined(VALGRIND)
|
||||
lt_dlclose (port->pc->lh);
|
||||
lt_dlexit ();
|
||||
#endif
|
||||
port->pc->lh = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user