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:
Marcus Meissner
2014-03-23 18:04:23 +00:00
parent c7a0b37b79
commit 8339628dfd
2 changed files with 6 additions and 0 deletions

View File

@@ -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'."),

View File

@@ -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;
}