Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

warning: pointer 'item' used after 'free' [-Wuse-after-free] (AEGHB-331) #53

Open
rinstrum-franz opened this issue Aug 7, 2023 · 2 comments

Comments

@rinstrum-franz
Copy link

rinstrum-franz commented Aug 7, 2023


/home/franz/git/rin/rinGate/rinGate/components/web_server/src/web_server.c: In function 'stop_scan_filter':
/home/franz/git/rin/rinGate/rinGate/components/web_server/src/web_server.c:290:103: warning: pointer 'fail_item' used after 'free' [-Wuse-after-free]
  290 |         for (router_obj_t *fail_item = SLIST_FIRST(&s_router_fail_list); fail_item != NULL; fail_item = SLIST_NEXT(fail_item, next)) {
      |                                                                                                       ^
/home/franz/git/rin/rinGate/rinGate/components/web_server/src/web_server.c:292:13: note: call to 'free' here
  292 |             free(fail_item);
      |             ^~~~~~~~~~~~~~~
/home/franz/git/rin/rinGate/rinGate/components/web_server/src/web_server.c: In function 'esp_web_start_scan_filter':
/home/franz/git/rin/rinGate/rinGate/components/web_server/src/web_server.c:612:73: warning: pointer 'item' used after 'free' [-Wuse-after-free]
  612 |         for (item = SLIST_FIRST(&s_router_all_list); item != NULL; item = SLIST_NEXT(item, next)) {
      |                                                                         ^
/home/franz/git/rin/rinGate/rinGate/components/web_server/src/web_server.c:615:13: note: call to 'free' here
  615 |             free(item);
      |             ^~~~~~~~~~
@github-actions github-actions bot changed the title warning: pointer 'item' used after 'free' [-Wuse-after-free] warning: pointer 'item' used after 'free' [-Wuse-after-free] (AEGHB-331) Aug 7, 2023
@tswen
Copy link
Contributor

tswen commented Aug 8, 2023

Hello, thank you for your feedback. Although these warnings do not affect the functionality, we will work on optimizing and resolving these warnings in the future.

@rinstrum-franz
Copy link
Author

rinstrum-franz commented Aug 8, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants