leak-detective: LEAK_DETECTIVE_DISABLE completely disables LD

If lib->leak_detective is non-null some code parts (e.g. the plugin
loader) assume LD is actually used.
This commit is contained in:
Tobias Brunner
2014-04-03 09:44:26 +02:00
parent 7a61bf9032
commit adc1157487
3 changed files with 23 additions and 17 deletions
+5 -2
View File
@@ -265,8 +265,11 @@ bool library_init(char *settings, const char *namespace)
#ifdef LEAK_DETECTIVE
lib->leak_detective = leak_detective_create();
lib->leak_detective->set_report_cb(lib->leak_detective,
report_leaks, sum_leaks, NULL);
if (lib->leak_detective)
{
lib->leak_detective->set_report_cb(lib->leak_detective,
report_leaks, sum_leaks, NULL);
}
#endif /* LEAK_DETECTIVE */
pfh = printf_hook_create();