8000 turbostat plugin: free the right variable by rubenk · Pull Request #2948 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

turbostat plugin: free the right variable #2948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rubenk
Copy link
Contributor
@rubenk rubenk commented Oct 10, 2018

scan-build: Using '/usr/bin/clang-6.0' for static analysis
make all-am
make[1]: Entering directory '/home/ruben/src/collectd'
CC src/turbostat.lo
src/turbostat.c:1292:5: warning: Argument to free() is the address of the global variable 'thread_delta', which is not memory allocated by malloc()
sfree(threads);
^~~~~~~~~~~~~~
./src/daemon/common.h:41:5: note: expanded from macro 'sfree'
free(ptr);
^~~~~~~~~
src/turbostat.c:1299:5: warning: Argument to free() is the address of the global variable 'core_delta', which is not memory allocated by malloc()
sfree(cores);
^~~~~~~~~~~~
./src/daemon/common.h:41:5: note: expanded from macro 'sfree'
free(ptr);
^~~~~~~~~
2 warnings generated.
CCLD turbostat.la

(cherry picked from commit 74eda95)

@rubenk rubenk requested a review from octo October 10, 2018 13:05
@collectd-bot collectd-bot added this to the 5.8 milestone Oct 10, 2018
scan-build: Using '/usr/bin/clang-6.0' for static analysis
make  all-am
make[1]: Entering directory '/home/ruben/src/collectd'
  CC       src/turbostat.lo
src/turbostat.c:1292:5: warning: Argument to free() is the address of the global variable 'thread_delta', which is not memory allocated by malloc()
    sfree(threads);
    ^~~~~~~~~~~~~~
./src/daemon/common.h:41:5: note: expanded from macro 'sfree'
    free(ptr);                                                                 \
    ^~~~~~~~~
src/turbostat.c:1299:5: warning: Argument to free() is the address of the global variable 'core_delta', which is not memory allocated by malloc()
    sfree(cores);
    ^~~~~~~~~~~~
./src/daemon/common.h:41:5: note: expanded from macro 'sfree'
    free(ptr);                                                                 \
    ^~~~~~~~~
2 warnings generated.
  CCLD     turbostat.la

(cherry picked from commit 74eda95)
@rubenk rubenk force-pushed the turbostat-free-the-right-vars branch from bcdfb4f to 4f4db56 Compare October 10, 2018 13:12
Copy link
Member
@octo octo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@octo octo added Automerge Labels PRs to be merged by a bot once approved Bug A genuine bug labels Oct 11, 2018
@collectd-bot collectd-bot merged commit 4483e38 into collectd:collectd-5.8 Oct 11, 2018
@octo octo added Fix A pull request fixing a bug and removed Bug A genuine bug labels Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automerge Labels PRs to be merged by a bot once approved Fix A pull request fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0