Page MenuHomeFreeBSD

Memory leaks in libc's nis_passwd() and nisgroup()
ClosedPublic

Authored by pfg on Feb 15 2015, 9:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 26 2024, 9:51 PM
Unknown Object (File)
Sep 22 2024, 7:07 PM
Unknown Object (File)
Sep 16 2024, 9:25 AM
Unknown Object (File)
Sep 9 2024, 3:06 AM
Unknown Object (File)
Sep 8 2024, 8:05 PM
Unknown Object (File)
Sep 8 2024, 12:08 AM
Unknown Object (File)
Aug 17 2024, 2:47 AM
Unknown Object (File)
Aug 17 2024, 1:04 AM
Subscribers

Details

Reviewers
delphij
Summary

CID 1016715
CID 1016717

Resource leak (RESOURCE_LEAK)17. leaked_storage:
Variable result going out of scope leaks the storage it points to.

The code is somewhat tricky so it's not a good idea
free the variable before the return as we can cause
double free()s; instead free the memory just before
jumping to the label.

Test Plan

I don't generally use NIS, but that's the area that might most
likely be affected.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

pfg retitled this revision from to Memory leaks in libc's nis_passwd() and nisgroup().
pfg updated this object.
pfg edited the test plan for this revision. (Show Details)
This comment was removed by pfg.
delphij added a reviewer: delphij.
delphij added a subscriber: delphij.

Looks reasonable to me.

This revision is now accepted and ready to land.Feb 20 2015, 12:29 AM

Committed as rI279035.