Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
T
Tor
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,065
    • Issues 1,065
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 17
    • Merge Requests 17
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • The Tor Project
  • Core
  • Tor
  • Issues
  • #29824

Closed
Open
Opened Mar 19, 2019 by Taylor Yu@catalyst

CID 1444119 resource leak in BUG case in consdiff.c

*** CID 1444119:  Resource leaks  (RESOURCE_LEAK)
/src/feature/dircommon/consdiff.c: 1392 in consensus_diff_apply()
1386       int r1;
1387       char *result = NULL;
1388       memarea_t *area = memarea_new();
1389     
1390       r1 = consensus_compute_digest_as_signed(consensus, consensus_len, &d1);
1391       if (BUG(r1 < 0))
>>>     CID 1444119:  Resource leaks  (RESOURCE_LEAK)
>>>     Variable "area" going out of scope leaks the storage it points to.
1392         return NULL; // LCOV_EXCL_LINE
1393     
1394       lines1 = smartlist_new();
1395       lines2 = smartlist_new();
1396       if (consensus_split_lines(lines1, consensus, consensus_len, area) < 0)
1397         goto done;

This looks to be a leak if there is a BUG() condition, and the line is already marked LCOV_EXCL_LINE. Should we mark this as ignored or something in Coverity, or do we want to put cleanup code under that BUG() condition?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.3.5.x-final
Milestone
Tor: 0.3.5.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: tpo/core/tor#29824