[ZBX-4802] Consider releasing memory taken by strings before calling zbx_vector_str_destroy() Created: 2012 Mar 26 Updated: 2017 May 30 Resolved: 2012 Apr 03 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Agent (G) |
| Affects Version/s: | 2.0.0rc2 |
| Fix Version/s: | 2.0.0rc3 |
| Type: | Incident report | Priority: | Trivial |
| Reporter: | Andris Mednis | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | memoryleak | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
zbx_vector_str_destroy() does not release memory used by individual strings contained in the vector. You have to do it explicitly, for example: |
| Comments |
| Comment by Andris Mednis [ 2012 Apr 02 ] |
|
zbx_vector_str_destroy() is used in: Uses of zbx_vector_ptr_destroy() were also proactively checked. One unclear case was found (see |
| Comment by Alexander Vladishev [ 2012 Apr 02 ] |
|
Successfully tested! |
| Comment by Andris Mednis [ 2012 Apr 03 ] |
|
Fixed in version 2.0.0rc3(trunk) (revision 26573). |
| Comment by Andris Mednis [ 2012 Apr 03 ] |
|
Fixed in version 2.0.0rc3(trunk) (revision 26573). |
| Comment by richlv [ 2012 Sep 11 ] |
|
it's possible this resulted in a regression : |
| Comment by Andris Mednis [ 2012 Sep 12 ] |
|
Confirmed: changes done in |