From d65cccc32ab39ec3b942439e6f8ef9fbdd56c241 Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Wed, 17 Oct 2012 05:03:45 +0000 Subject: [PATCH] ID: 3577155 - 'lib/ipmi_main.c' - memory leaks Commit fixes two memory leaks in 'lib/ipmi_main.c'. They were caused by not freeing memory allocated by strdup() which uses malloc() underneath. Reported by Duncan Idaho. --- ipmitool/lib/ipmi_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ipmitool/lib/ipmi_main.c b/ipmitool/lib/ipmi_main.c index c88f457..718a7f1 100644 --- a/ipmitool/lib/ipmi_main.c +++ b/ipmitool/lib/ipmi_main.c @@ -960,6 +960,10 @@ ipmi_main(int argc, char ** argv, free(oemtype); if (seloem != NULL) free(seloem); + if (kgkey != NULL) + free(kgkey); + if (sdrcache != NULL) + free(sdrcache); return rc; }