From: David Goulet Date: Fri, 9 Nov 2012 20:28:06 +0000 (-0500) Subject: Fix: Add pointer check when freeing poll events X-Git-Tag: v2.1.0-rc7~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b3066218aa8de35a47303bb198e62af43ca4d720;p=lttng-tools.git Fix: Add pointer check when freeing poll events Signed-off-by: David Goulet --- 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); + } } /*