X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=liblttng-ust-dl%2Fustdl.c;h=b6abca7b6e13c7562bbb4d1b8fccbcaea64bdf2b;hb=04fc40add7c59d75d259a7446f1f4edb32bf1967;hp=3038d5c3636a87e85781147f3c65b7e0835f3861;hpb=5aed31fc78ae3bd62d67ea52bad4615b71e45d0f;p=lttng-ust.git diff --git a/liblttng-ust-dl/ustdl.c b/liblttng-ust-dl/ustdl.c index 3038d5c3..b6abca7b 100644 --- a/liblttng-ust-dl/ustdl.c +++ b/liblttng-ust-dl/ustdl.c @@ -18,8 +18,8 @@ #define _LGPL_SOURCE #define _GNU_SOURCE +#include #include -#include #include #include #include @@ -90,7 +90,7 @@ void lttng_ust_baddr_push(void *so_base, const char *so_name) void *dlopen(const char *filename, int flag) { void *handle = _lttng_ust_dl_libc_dlopen(filename, flag); - if (handle) { + if (__tracepoint_ptrs_registered && handle) { struct link_map *p = NULL; if (dlinfo(handle, RTLD_DI_LINKMAP, &p) != -1 && p != NULL && p->l_addr != 0) @@ -101,7 +101,7 @@ void *dlopen(const char *filename, int flag) int dlclose(void *handle) { - if (handle) { + if (__tracepoint_ptrs_registered && handle) { struct link_map *p = NULL; if (dlinfo(handle, RTLD_DI_LINKMAP, &p) != -1 && p != NULL && p->l_addr != 0)