These examples won't leak memory continuously so why is this a problem?
Are we catering to e.g. bare metal environments which may not clean up
after applications have terminated?


On 11 March 2015 at 14:52, Ciprian Barbu <[email protected]> wrote:

> This series continues the patch I sent some while ago to replace strtok
> with
> strtok_r in odp_pktio:
>
> https://git.linaro.org/lng/odp.git/commit/273955e6db6bb220f2736d3709e4237c50d04772
>
> The bug that this series fixes only refers to resource leaks, but the
> initial
> strtok_r fix should have been done for all examples, there is no need to
> use the
> reentrant version of strtok because it is only used from one thread, once,
> during parsing of args.
>
> There was a suggestion at some point to make the parsing of if_names
> common for
> all examples, I don't think it's easy to factor it out, it would introduce
> more
> code than necessary and we're only talking about a few lines of code.
>
> Ciprian Barbu (3):
>   example: odp_l2fwd: replace strtok_r with strtok and fix leaks
>   example: odp_ipsec: replace strtok_r with strtok and fix leaks
>   example: generator: replace strtok_r with strtok and fix leaks
>
>  example/generator/odp_generator.c | 30 ++++++++++++++++--------------
>  example/ipsec/odp_ipsec.c         | 30 ++++++++++++++----------------
>  example/l2fwd/odp_l2fwd.c         | 29 +++++++++++++++--------------
>  3 files changed, 45 insertions(+), 44 deletions(-)
>
> --
> 1.8.3.2
>
>
> _______________________________________________
> lng-odp mailing list
> [email protected]
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to