plug leak if get_fsdev_paths fails

This commit is contained in:
Doug MacEachern 2005-10-07 18:40:10 +00:00
parent ea6b08a70f
commit bbd57876df
1 changed files with 1 additions and 1 deletions

View File

@ -1269,6 +1269,7 @@ static int create_fsdev_cache(sigar_t *sigar)
} }
if (!(mapping = get_fsdev_paths(sigar, &fslist))) { if (!(mapping = get_fsdev_paths(sigar, &fslist))) {
sigar_file_system_list_destroy(sigar, &fslist);
return ENOENT; return ENOENT;
} }
@ -1323,7 +1324,6 @@ static int create_fsdev_cache(sigar_t *sigar)
} }
} }
sigar_file_system_list_destroy(sigar, &fslist); sigar_file_system_list_destroy(sigar, &fslist);
return SIGAR_OK; return SIGAR_OK;