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
This commit is contained in:
Rom Lemarchand 2013-09-24 10:49:21 -07:00
parent 6b1a027239
commit 397a364214
1 changed files with 4 additions and 0 deletions

View File

@ -430,6 +430,10 @@ void fs_mgr_free_fstab(struct fstab *fstab)
{
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);