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

Static code analysis _047 (The resource was not freed) #71

Open
PawelModrzejewski opened this issue Dec 22, 2020 · 0 comments
Open

Static code analysis _047 (The resource was not freed) #71

PawelModrzejewski opened this issue Dec 22, 2020 · 0 comments

Comments

@PawelModrzejewski
Copy link
Contributor

Short summary (details in attached file):

    EtherTimestamper *timestamper = new LinuxTimestamperGeneric();
    (...)
        if (pthread_sigmask(SIG_BLOCK, &set, NULL) != 0) {

Event 110:  Taking true branch.  pthread_sigmask(...) != 0 evaluates to true.
            perror("pthread_sigmask()");
            GPTP_LOG_UNREGISTER();
            return -1;
	
Event 111:  timestamper has gone out of scope and no longer references the resource of interest

gptp_047.txt

PawelModrzejewski added a commit to PawelModrzejewski/gptp that referenced this issue Jan 19, 2021
Static code analysis fixes _005/_007..._011/_014..._016/_047

Issues: Avnu#41 Avnu#42 Avnu#43 Avnu#44 Avnu#45 Avnu#46 Avnu#48 Avnu#49 Avnu#50 Avnu#71

Minor main() refactoring and macro for deleting all objects created
during start up - limits memory leaks.
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

No branches or pull requests

1 participant