Actions
Bug #4061
closedlibzfs: memory leak in iter_dependents_cb()
Start date:
2013-08-20
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:
Description
There is a memory leak in iter_dependents_cb(). It is expected that the iter_dependents_cb() calls zfs_close() for the passed zhp. It is true for all codepaths, except this one:
446 if (!first && err == 0) 447 err = ida->func(zhp, ida->data); 448 return (err);
The ida->func() is calling the zfs_close(zhp) too, but in a case the condition at line 446 is false the zfs_close() is not called.
To reproduce the issue download attached leaks_rename.c and leaks_rename.sh and run leaks_rename.sh.
Files
Updated by Marcel Telka over 10 years ago
- Status changed from In Progress to Pending RTI
Updated by Marcel Telka over 10 years ago
- Status changed from Pending RTI to Resolved
- % Done changed from 0 to 100
Resolved in:
commit 2fbdf8dbf01ec1c85fcd3827cdf9e9f5f46c4c8a Author: Marcel Telka <marcel.telka@nexenta.com> Date: Thu Aug 15 22:33:42 2013 +0200 4061 libzfs: memory leak in iter_dependents_cb() Reviewed by: Jeffry Molanus <jeffry.molanus@nexenta.com> Reviewed by: Boris Protopopov <boris.protopopov@nexenta.com> Reviewed by: Andy Stormont <andyjstormont@gmail.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@nexenta.com>
Actions