projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Uninitialized pointer read
[lttng-tools.git]
/
src
/
common
/
compat
/
poll.h
diff --git
a/src/common/compat/poll.h
b/src/common/compat/poll.h
index 9e889767f8321a05ea23f97c211086cf0c6e3836..e69d59b42d054efbc900fd5412db093362fc5190 100644
(file)
--- a/
src/common/compat/poll.h
+++ b/
src/common/compat/poll.h
@@
-166,13
+166,18
@@
static inline void lttng_poll_clean(struct lttng_poll_event *events)
{
int ret;
{
int ret;
- if (events) {
+ if (!events) {
+ return;
+ }
+
+ if (events->epfd >= 0) {
ret = close(events->epfd);
if (ret) {
perror("close");
}
ret = close(events->epfd);
if (ret) {
perror("close");
}
- __lttng_poll_free((void *) events->events);
}
}
+
+ __lttng_poll_free((void *) events->events);
}
#else /* HAVE_EPOLL */
}
#else /* HAVE_EPOLL */
This page took
0.024 seconds
and
4
git commands to generate.