plug leak if get_fsdev_paths fails
This commit is contained in:
parent
ea6b08a70f
commit
bbd57876df
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue