Skip to content
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

broker/hello: fix leak/error detection in flux_rpc #786

Merged
merged 1 commit into from Aug 29, 2016

Conversation

Projects
None yet
4 participants
@grondo
Copy link
Contributor

grondo commented Aug 29, 2016

The flux_rpc() use in broker/hello.c seemed to assume integer return
and tested for error code < 0. Fix the call so that the flux_rpc_t
returned from the call is captured, and test for NULL on error.

This also allows the rpc object to be freed, fixing a small leak.

I don't know why this is not a compilation error, or why cppcheck didn't catch the leak. If I missed something simple there, I apologize in advance.

broker/hello: fix leak/error detection in flux_rpc
The flux_rpc() use in broker/hello.c seemed to assume integer return
and tested for error code < 0. Fix the call so that the flux_rpc_t
returned from the call is captured, and test for NULL on error.

This also allows the rpc object to be freed, fixing a small leak.

@grondo grondo added the review label Aug 29, 2016

@coveralls

This comment has been minimized.

Copy link

coveralls commented Aug 29, 2016

Coverage Status

Coverage increased (+0.02%) to 75.13% when pulling 7a7f842 on grondo:hello-leak into 181d3ca on flux-framework:master.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Aug 29, 2016

Current coverage is 74.80% (diff: 100%)

Merging #786 into master will increase coverage by 0.01%

@@             master       #786   diff @@
==========================================
  Files           145        145          
  Lines         25038      25040     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          18726      18732     +6   
+ Misses         6312       6308     -4   
  Partials          0          0          
Diff Coverage File Path
•••••••••• 100% src/broker/hello.c

Powered by Codecov. Last update 181d3ca...7a7f842

@garlick

This comment has been minimized.

Copy link
Member

garlick commented Aug 29, 2016

Eek! Egregious error! Merging.

@garlick garlick merged commit 1e403d9 into flux-framework:master Aug 29, 2016

4 checks passed

codecov/patch 100% of diff hit (target 74.79%)
Details
codecov/project 74.80% (+0.01%) compared to 181d3ca
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 75.13%
Details

@garlick garlick removed the review label Aug 29, 2016

@grondo grondo deleted the grondo:hello-leak branch Sep 17, 2016

@garlick garlick referenced this pull request Oct 26, 2016

Closed

0.5.0 release notes #879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.