commit | 397a3642145dbd0919f8148ff24f0cafe1714b55 | [log] [tgz] |
---|---|---|
author | Rom Lemarchand <romlem@google.com> | Tue Sep 24 10:49:21 2013 -0700 |
committer | Rom Lemarchand <romlem@google.com> | Tue Sep 24 10:49:46 2013 -0700 |
tree | 63a692a983b7393d5faeebfdfb51dfb83ec31427 | |
parent | 6b1a027239689a817aa5ca44a2bcbfe48ed21408 [diff] |
fs_mgr: check that fstab is not NULL in fs_mgr_free_fstab Make sure fstab is not NULL before freeing it Bug: 10911605 Change-Id: I549c0a470dd183fb15a2f3c5cf4f3dd393b6e307
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c index 3500c91..f432f6a 100644 --- a/fs_mgr/fs_mgr.c +++ b/fs_mgr/fs_mgr.c
@@ -430,6 +430,10 @@ { int i; + if (!fstab) { + return; + } + for (i = 0; i < fstab->num_entries; i++) { /* Free the pointers return by strdup(3) */ free(fstab->recs[i].blk_device);