Fix: Add pointer check when freeing poll events
authorDavid Goulet <dgoulet@efficios.com>
Fri, 9 Nov 2012 20:28:06 +0000 (15:28 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Fri, 9 Nov 2012 20:28:06 +0000 (15:28 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/compat/poll.h

index 99b608cce77cdca5595abd0afe2948eb9eae399f..cfde4fc8381d36786f23683de1ffa7cc3f9e40f8 100644 (file)
@@ -42,7 +42,9 @@ extern unsigned int poll_max_size;
  */
 static inline void __lttng_poll_free(void *events)
 {
  */
 static inline void __lttng_poll_free(void *events)
 {
-       free(events);
+       if (events) {
+               free(events);
+       }
 }
 
 /*
 }
 
 /*
This page took 0.033898 seconds and 4 git commands to generate.