projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Add pointer check when freeing poll events
[lttng-tools.git]
/
src
/
common
/
compat
/
poll.h
diff --git
a/src/common/compat/poll.h
b/src/common/compat/poll.h
index 46200ac3e313effea9c198ef0dd061008341133e..cfde4fc8381d36786f23683de1ffa7cc3f9e40f8 100644
(file)
--- 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)
{
*/
static inline void __lttng_poll_free(void *events)
{
- free(events);
+ if (events) {
+ free(events);
+ }
}
/*
}
/*
@@
-188,7
+190,7
@@
enum {
#if __linux__
LPOLLMSG = POLLMSG,
LPOLLRDHUP = POLLRDHUP,
#if __linux__
LPOLLMSG = POLLMSG,
LPOLLRDHUP = POLLRDHUP,
-#elif
defined(__FreeBSD__
)
+#elif
(defined(__FreeBSD__) || defined(__CYGWIN__)
)
LPOLLMSG = 0,
LPOLLRDHUP = 0,
#else
LPOLLMSG = 0,
LPOLLRDHUP = 0,
#else
This page took
0.023364 seconds
and
4
git commands to generate.