Page MenuHomeFreeBSD

Fix a memory leak in i2c
Needs ReviewPublic

Authored by trix_juniper.net on Mar 2 2017, 2:35 PM.

Details

Reviewers
zbb
stevek
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
Lint
Lint Skipped
Unit
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.