[syslinux:syslinux-4.xx] hdt: Fixing memory leak in cli
syslinux-bot for Felipe Pena
felipensp at gmail.com
Sat Feb 1 05:00:02 PST 2014
Commit-ID: cee0d66107fcd29c7ad4df0572d190a83917f29d
Gitweb: http://www.syslinux.org/commit/cee0d66107fcd29c7ad4df0572d190a83917f29d
Author: Felipe Pena <felipensp at gmail.com>
AuthorDate: Wed, 29 Jan 2014 20:16:42 +0100
Committer: Gene Cumm <gene.cumm at gmail.com>
CommitDate: Sat, 1 Feb 2014 07:59:19 -0500
hdt: Fixing memory leak in cli
The dynamically alloc'd string to protect from strtok modification
has not been free'd on start_auto_mode() function.
This patch insure the free is done properly.
---
com32/hdt/hdt-cli.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c
index 7542da8..8c43800 100644
--- a/com32/hdt/hdt-cli.c
+++ b/com32/hdt/hdt-cli.c
@@ -780,6 +780,8 @@ void start_auto_mode(struct s_hardware *hardware)
mypch = strtok(NULL, AUTO_SEPARATOR);
}
+ free(temp);
+
/* Executing found commands */
for (int i = 1; i <= nb_commands; i++) {
if (commands[i]) {
More information about the Syslinux-commits
mailing list