FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Memory leaks in examples/general.c · Issue #4070 · libgit2/libgit2 · GitHub

Repository navigation

Memory leaks in examples/general.c #4070

Description

Reproduction steps

I originally discovered these memory leaks by reading the code. To confirm my suspicions I ran valgrind, which discovered a couple more. I attach the valgrind output, which clearly shows the causes of the leaks.

valgrind1.txt

Expected behavior

Memory leaks are bad, even in example programs (or maybe especially in example programs). There should be no memory leaks in any of the example programs.

Actual behavior

There are ten memory leaks in examples/general.

Version of libgit2 (release number or SHA1)

v0.25.0

Operating system(s) tested

Lubuntu 16.10

Additional Information

Valgrind also detected the use of an uninitialized variable ("j") in config_files(). I have submitted a Pull Request to fix this problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL