]> git.ipfire.org Git - thirdparty/curl.git/commit
asyn-thread: drop `free()` on non-heap address
authorViktor Szakats <commit@vsz.me>
Sat, 15 Mar 2025 01:39:05 +0000 (02:39 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 15 Mar 2025 22:01:12 +0000 (23:01 +0100)
commit6b143d9cc13fcd208480f678dfd06bf97bde4998
treefdcc5f50d489ecfb8bdd8ebc39c41faf75726a02
parentebce3f0c02a78c1b440516654ad2d3a91dffa2fc
asyn-thread: drop `free()` on non-heap address

seen with mingw-w64 gcc 14.2.0 while playing with other modifications:
```
lib/asyn-thread.c: In function 'init_resolve_thread':
lib/asyn-thread.c:447:5: warning: 'free' called on pointer 'data' with nonzero offset 3264 [-Wfree-nonheap-object]
  447 |     free(td);
      |     ^~~~~~~~
```

Where `td` is:
```c
  struct thread_data *td = &data->state.async.thdata;
```

Follow-up to d9fc64d3ab289a84548e952183d7eba79ccc846e #16241
Closes #16734
lib/asyn-thread.c