From 51dd9cf1f0ab6f9fd5ed9a3c2d2985942f8b5a32 Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Wed, 22 May 2013 10:16:59 +0000 Subject: [PATCH] ID: 3613605 - 'lib/ipmi_main.c' - call free() on pointer to static data getpass() and getpassphrase() library functions return pointer to a static data array. When free() is called on such pointer, it abnormally terminates application. Commit for Dmitry Bazhenov --- ipmitool/lib/ipmi_main.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/ipmitool/lib/ipmi_main.c b/ipmitool/lib/ipmi_main.c index 5d22c09..6884c6e 100644 --- a/ipmitool/lib/ipmi_main.c +++ b/ipmitool/lib/ipmi_main.c @@ -504,7 +504,6 @@ ipmi_main(int argc, char ** argv, password = NULL; } password = strdup(tmp_pass); - free(tmp_pass); tmp_pass = NULL; if (password == NULL) { lprintf(LOG_ERR, "%s: malloc failure", progname); @@ -560,7 +559,6 @@ ipmi_main(int argc, char ** argv, kgkey = NULL; } kgkey = strdup(tmp_pass); - free(tmp_pass); tmp_pass = NULL; if (kgkey == NULL) { lprintf(LOG_ERR, "%s: malloc failure", progname); @@ -794,7 +792,6 @@ ipmi_main(int argc, char ** argv, #endif if (tmp_pass != NULL) { password = strdup(tmp_pass); - free(tmp_pass); tmp_pass = NULL; if (password == NULL) { lprintf(LOG_ERR, "%s: malloc failure", progname);