commit | ef65d7304685707e0f59d9863d5d54992b123ebc | [log] [tgz] |
---|---|---|
author | robert_ch_chou <robert_ch_chou@acer.com.tw> | Sat Jun 04 23:38:50 2011 +0800 |
committer | Robert CH Chou <Robert_CH_Chou@acer.com.tw> | Sat Jun 04 23:42:27 2011 +0800 |
tree | 7903ce88a6f8e658d817448e635108970e27bc99 | |
parent | 477904934945ff04029cfa26a9030a908fbdb2d2 [diff] |
fix possible memory leaking Change-Id: Ia10d4d15ca662edadfcd83491d5f2cab19669fef
diff --git a/dir.c b/dir.c index b09ab53..7e4a567 100644 --- a/dir.c +++ b/dir.c
@@ -474,10 +474,12 @@ 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;