diff options
author | Colin Cross <ccross@android.com> | 2016-02-01 11:15:30 -0800 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2016-02-01 11:19:26 -0800 |
commit | 1eb743ba8b63daf773ed4628504a3bb95ee2c156 (patch) | |
tree | a1d24c7c5a9bbfe53d716cfc02129b5f2c3e353c /fastboot/socket_mock.cpp | |
parent | a9352202dd52a404199fbdca160d9d2d0992cf63 (diff) |
Fix static analyzer issues caught by clang
system/core/libsparse/sparse_read.c:260:51: warning: Dereference of null pointer (loaded from variable 'crc_ptr')
ret = process_crc32_chunk(fd, chunk_data_size, *crc_ptr);
system/core/libsparse/sparse_read.c:404:9: warning: Potential leak of memory pointed to by 'buf'
return 0;
Fixes leak in sparse_file_read_normal, and null pointer dereference
crash if an image with an obsolete CRC chunk was read with CRC checking
disabled.
Bug: 26904425
Change-Id: Ibc72cd37602929ae2c248bea1cdd1d22ea03baaf
Diffstat (limited to 'fastboot/socket_mock.cpp')
0 files changed, 0 insertions, 0 deletions