summaryrefslogtreecommitdiff
path: root/src/libstrongswan/library.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/library.c')
-rw-r--r--src/libstrongswan/library.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstrongswan/library.c b/src/libstrongswan/library.c
index 8472c30a5..c5bb4cd93 100644
--- a/src/libstrongswan/library.c
+++ b/src/libstrongswan/library.c
@@ -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();