am 397a3642: fs_mgr: check that fstab is not NULL in fs_mgr_free_fstab
* commit '397a3642145dbd0919f8148ff24f0cafe1714b55': fs_mgr: check that fstab is not NULL in fs_mgr_free_fstab
This commit is contained in:
commit
b5ffadedd4
1 changed files with 4 additions and 0 deletions
|
|
@ -377,6 +377,10 @@ void fs_mgr_free_fstab(struct fstab *fstab)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!fstab) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < fstab->num_entries; i++) {
|
for (i = 0; i < fstab->num_entries; i++) {
|
||||||
/* Free the pointers return by strdup(3) */
|
/* Free the pointers return by strdup(3) */
|
||||||
free(fstab->recs[i].blk_device);
|
free(fstab->recs[i].blk_device);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue