Page MenuHomeFreeBSD

Fix a memory leak in i2c
AbandonedPublic

Authored by stevek on Mar 2 2017, 2:35 PM.
Tags
None
Referenced Files
F105560928: D9865.diff
Tue, Dec 17, 4:35 PM
Unknown Object (File)
Sun, Nov 24, 10:45 PM
Unknown Object (File)
Nov 15 2024, 6:38 AM
Unknown Object (File)
Nov 7 2024, 8:03 AM
Unknown Object (File)
Oct 2 2024, 6:11 AM
Unknown Object (File)
Sep 9 2024, 1:39 AM
Unknown Object (File)
Sep 8 2024, 8:56 PM
Unknown Object (File)
Sep 6 2024, 6:42 AM
Subscribers

Details

Summary

When the realloc of buf fails, buf is never freed before returning.
Convert to reallocf so buf is freed.

Test Plan

Run clang's static analyzer, scan-build, before to find the problem, run after to show resolution.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

trix_juniper.net retitled this revision from to Fix a memory leak in i2c.
trix_juniper.net updated this object.
trix_juniper.net edited the test plan for this revision. (Show Details)
trix_juniper.net added reviewers: stevek, zbb.
trix_juniper.net set the repository for this revision to rS FreeBSD src repository - subversion.
stevek abandoned this revision.
stevek edited reviewers, added: trix_juniper.net; removed: stevek.

Handled by commit e06874f3f6d1f