The dynamically alloc'd string to protect from strtok modification has not been free'd on start_auto_mode() function Signed-off-by: Felipe Pena <felipensp at gmail.com> --- com32/hdt/hdt-cli.c | 1 + 1 file changed, 1 insertion(+) diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c index 7542da8..6c5baf1 100644 --- a/com32/hdt/hdt-cli.c +++ b/com32/hdt/hdt-cli.c @@ -779,6 +779,7 @@ 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++) { -- 1.7.10.4
On Mon, 23 Sep, at 10:28:32PM, Felipe Pena wrote:> The dynamically alloc'd string to protect from strtok modification > has not been free'd on start_auto_mode() function > > Signed-off-by: Felipe Pena <felipensp at gmail.com> > --- > com32/hdt/hdt-cli.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c > index 7542da8..6c5baf1 100644 > --- a/com32/hdt/hdt-cli.c > +++ b/com32/hdt/hdt-cli.c > @@ -779,6 +779,7 @@ 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++) {Erwan, are you planning on picking this up for upstream hdt? -- Matt Fleming, Intel Open Source Technology Center
Apparently Analagous Threads
- [PATCH 1/1] gpxe: fix possible null pointer dereference
- [PATCH 1/1] gpxe: fix possible null pointer dereference
- problema con grafico lattice ....
- Get rid of printf format warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’
- [PATCH 1/1] gpxe: fix possible null pointer dereference