From bbd57876df3909fcc515fa5a53b72e9a1ea206b3 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 7 Oct 2005 18:40:10 +0000 Subject: [PATCH] plug leak if get_fsdev_paths fails --- src/os/solaris/solaris_sigar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index 4e6a0f0b..7f493119 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -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;