Message ID | 1426722362-30982-1-git-send-email-mike.holmes@linaro.org |
---|---|
State | Accepted |
Commit | 478cc6c6caa7b95c533cb6e40aaeda029a42550c |
Headers | show |
On 03/19/15 02:46, Mike Holmes wrote: > clean up after calling malloc > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > test/validation/odp_timer.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c > index 1582c63..fd8065d 100644 > --- a/test/validation/odp_timer.c > +++ b/test/validation/odp_timer.c > @@ -427,6 +427,8 @@ static void *worker_entrypoint(void *arg) > if (tt[i].ev != ODP_EVENT_INVALID) > odp_timeout_free(odp_timeout_from_event(tt[i].ev)); > } > + > + free(tt); > LOG_DBG("Thread %u: exiting\n", thr); > return NULL; > } That looks reasonable, it was easy to find if tt was at the beginning of function :) Maxim.
Mered, as it simple fix. Maxim. On 03/19/15 02:46, Mike Holmes wrote: > clean up after calling malloc > > Signed-off-by: Mike Holmes <mike.holmes@linaro.org> > --- > test/validation/odp_timer.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c > index 1582c63..fd8065d 100644 > --- a/test/validation/odp_timer.c > +++ b/test/validation/odp_timer.c > @@ -427,6 +427,8 @@ static void *worker_entrypoint(void *arg) > if (tt[i].ev != ODP_EVENT_INVALID) > odp_timeout_free(odp_timeout_from_event(tt[i].ev)); > } > + > + free(tt); > LOG_DBG("Thread %u: exiting\n", thr); > return NULL; > }
On 19 March 2015 at 14:44, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > On 03/19/15 02:46, Mike Holmes wrote: > >> clean up after calling malloc >> >> Signed-off-by: Mike Holmes <mike.holmes@linaro.org> >> --- >> test/validation/odp_timer.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c >> index 1582c63..fd8065d 100644 >> --- a/test/validation/odp_timer.c >> +++ b/test/validation/odp_timer.c >> @@ -427,6 +427,8 @@ static void *worker_entrypoint(void *arg) >> if (tt[i].ev != ODP_EVENT_INVALID) >> odp_timeout_free(odp_timeout_ >> from_event(tt[i].ev)); >> } >> + >> + free(tt); >> LOG_DBG("Thread %u: exiting\n", thr); >> return NULL; >> } >> > That looks reasonable, it was easy to find if tt was at the beginning of > function :) Pros use ctags. > > Maxim. > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/test/validation/odp_timer.c b/test/validation/odp_timer.c index 1582c63..fd8065d 100644 --- a/test/validation/odp_timer.c +++ b/test/validation/odp_timer.c @@ -427,6 +427,8 @@ static void *worker_entrypoint(void *arg) if (tt[i].ev != ODP_EVENT_INVALID) odp_timeout_free(odp_timeout_from_event(tt[i].ev)); } + + free(tt); LOG_DBG("Thread %u: exiting\n", thr); return NULL; }
clean up after calling malloc Signed-off-by: Mike Holmes <mike.holmes@linaro.org> --- test/validation/odp_timer.c | 2 ++ 1 file changed, 2 insertions(+)