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

Fix possible resource leaks in test #1090

Merged
merged 1 commit into from
Aug 15, 2018
Merged

Conversation

tvladyslav
Copy link

@tvladyslav tvladyslav commented Aug 15, 2018

We should be careful on exit and remember to close files / free memory. Even in tests.


This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Aug 15, 2018

CLA assistant check
All committers have signed the CLA.

@iphydf iphydf added this to the v0.2.x milestone Aug 15, 2018
Copy link
Member

@iphydf iphydf left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @crypto-universe)


testing/Messenger_test.c, line 181 at r1 (raw file):

    while (1) {
        uint8_t name[128];
        const char* filename = "Save.bak";

const char *const filename


testing/Messenger_test.c, line 197 at r1 (raw file):

        uint8_t *buffer = (uint8_t *)malloc(messenger_size(m));
        if (buffer == nullptr) {

Run other/astyle/format-source.

@tvladyslav
Copy link
Author

@iphydf astyle is an interesting tool, never seen it before :)

@iphydf
Copy link
Member

iphydf commented Aug 15, 2018

@crypto-universe it's a terrible tool, but for now we're stuck with it. Thanks for this fix PR :).

Copy link
Member

@iphydf iphydf left a comment

Choose a reason for hiding this comment

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

:lgtm_strong:

Reviewed 1 of 1 files at r2.
Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @crypto-universe)

@iphydf iphydf merged commit 3036cc1 into TokTok:master Aug 15, 2018
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.6 Aug 16, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants