X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Fpoll.h;h=cfde4fc8381d36786f23683de1ffa7cc3f9e40f8;hb=2ad3a9a03e56a52b68d9c2e6046e31da9bc6c4ef;hp=99b608cce77cdca5595abd0afe2948eb9eae399f;hpb=3247be18440ddc45bbc45f0cf9cdbc5691aae08e;p=lttng-tools.git diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h index 99b608cce..cfde4fc83 100644 --- a/src/common/compat/poll.h +++ b/src/common/compat/poll.h @@ -42,7 +42,9 @@ extern unsigned int poll_max_size; */ static inline void __lttng_poll_free(void *events) { - free(events); + if (events) { + free(events); + } } /*