Message ID | 20170926145806.18236-1-christian.storm@siemens.com |
---|---|
State | Accepted |
Headers | show |
Series | progress client: fix memory leak | expand |
On 26/09/2017 16:58, Christian Storm wrote: > char *buf is malloc()'d on initialization but not free()'d > in this control path. > Ouch...you're right ! > Signed-off-by: Christian Storm <christian.storm@siemens.com> > --- > tools/progress.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/progress.c b/tools/progress.c > index 4db0b22..5b732f8 100644 > --- a/tools/progress.c > +++ b/tools/progress.c > @@ -161,6 +161,7 @@ static void psplash_progress(char *pipe, struct progress_msg *pmsg) > return; > break; > case DONE: > + free(buf); > return; > break; > default: > Acked-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano
diff --git a/tools/progress.c b/tools/progress.c index 4db0b22..5b732f8 100644 --- a/tools/progress.c +++ b/tools/progress.c @@ -161,6 +161,7 @@ static void psplash_progress(char *pipe, struct progress_msg *pmsg) return; break; case DONE: + free(buf); return; break; default:
char *buf is malloc()'d on initialization but not free()'d in this control path. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- tools/progress.c | 1 + 1 file changed, 1 insertion(+)