plug leak if get_fsdev_paths fails
This commit is contained in:
1 parent
ea6b08a70f
commit
bbd57876df
1 file changed
+1
-1
@@ -1269,6 +1269,7 @@ static int create_fsdev_cache(sigar_t *sigar)
|
||||
}
|
||||
|
||||
if (!(mapping = get_fsdev_paths(sigar, &fslist))) {
|
||||
sigar_file_system_list_destroy(sigar, &fslist);
|
||||
return ENOENT;
|
||||
}
|
||||
|
||||
@@ -1323,7 +1324,6 @@ static int create_fsdev_cache(sigar_t *sigar)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sigar_file_system_list_destroy(sigar, &fslist);
|
||||
|
||||
return SIGAR_OK;
|
||||
|
||||
Reference in new issue
Block a user