diff options
author | robert_ch_chou <robert_ch_chou@acer.com.tw> | 2011-06-04 23:38:50 +0800 |
---|---|---|
committer | Robert CH Chou <Robert_CH_Chou@acer.com.tw> | 2011-06-04 23:42:27 +0800 |
commit | ef65d7304685707e0f59d9863d5d54992b123ebc (patch) | |
tree | 7903ce88a6f8e658d817448e635108970e27bc99 | |
parent | 477904934945ff04029cfa26a9030a908fbdb2d2 (diff) | |
download | android_external_fsck_msdos-ef65d7304685707e0f59d9863d5d54992b123ebc.tar.gz android_external_fsck_msdos-ef65d7304685707e0f59d9863d5d54992b123ebc.tar.bz2 android_external_fsck_msdos-ef65d7304685707e0f59d9863d5d54992b123ebc.zip |
fix possible memory leaking
Change-Id: Ia10d4d15ca662edadfcd83491d5f2cab19669fef
-rw-r--r-- | dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -474,10 +474,12 @@ check_dot_dot(int f, struct bootblock *boot, struct fatEntry *fat,struct dosDirE if (lseek64(f, off, SEEK_SET) != off) { printf("off = %llu\n", off); perror("Unable to lseek64"); + free(buf); return FSFATAL; } if (read(f, buf, last) != last) { perror("Unable to read"); + free(buf); return FSFATAL; } last /= 32; |