[stgt] [PATCH 04/15] Plug memleak: free the mode pages that were added with add_mode_page()
Arne Redlich
arne.redlich at googlemail.com
Tue Jun 9 18:22:04 CEST 2009
Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
---
usr/spc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/usr/spc.c b/usr/spc.c
index 2fc8e8e..1a75766 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -1061,5 +1061,8 @@ void spc_lu_exit(struct scsi_lu *lu)
if (lu_vpd[i])
free(lu_vpd[i]);
+ for (i = 0; i < ARRAY_SIZE(lu->mode_pgs); i++)
+ if (lu->mode_pgs[i])
+ free(lu->mode_pgs[i]);
}
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list