diff options
author | Elliott Hughes <enh@google.com> | 2013-10-29 14:29:26 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-29 14:29:26 -0700 |
commit | f17f55914e18eb176ccc5bb8266b248ece8cb56b (patch) | |
tree | b484ac8d44be0f04f73810c931f970bc955ecc6a /libsparse/output_file.c | |
parent | 0f26808e2c696f8bdcca644e0ddae2af9f753ada (diff) | |
parent | 36d44740dd045403ae615b8dd6dac8b9a4e9f5bf (diff) | |
download | system_core-f17f55914e18eb176ccc5bb8266b248ece8cb56b.zip system_core-f17f55914e18eb176ccc5bb8266b248ece8cb56b.tar.gz system_core-f17f55914e18eb176ccc5bb8266b248ece8cb56b.tar.bz2 |
am 36d44740: Merge "Fix a bunch of small system/core bugs."
* commit '36d44740dd045403ae615b8dd6dac8b9a4e9f5bf':
Fix a bunch of small system/core bugs.
Diffstat (limited to 'libsparse/output_file.c')
-rw-r--r-- | libsparse/output_file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libsparse/output_file.c b/libsparse/output_file.c index 2428022..a28b0a5 100644 --- a/libsparse/output_file.c +++ b/libsparse/output_file.c @@ -722,10 +722,12 @@ int write_fd_chunk(struct output_file *out, unsigned int len, } pos = lseek64(fd, offset, SEEK_SET); if (pos < 0) { + free(data); return -errno; } ret = read_all(fd, data, len); if (ret < 0) { + free(data); return ret; } ptr = data; |