Opened 8 years ago
Closed 8 years ago
#13115 closed bug (fixed)
[Patch] kits/tracker/NodePreloader.cpp: fix memory leak
Reported by: | mt | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Kits/libtracker.so | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
In NodePreloader::InstallNodePreloader(), it seems we need to delete 'result' at line 61 [1]. [1] http://cgit.haiku-os.org/haiku/tree/src/kits/tracker/NodePreloader.cpp#n61
Attachments (2)
Change History (8)
by , 8 years ago
Attachment: | 0040-NodePreloader.cpp-fix-memory-leak.patch added |
---|
comment:1 by , 8 years ago
patch: | 0 → 1 |
---|
by , 8 years ago
Attachment: | report-77d0e1.html added |
---|
follow-up: 3 comment:2 by , 8 years ago
Right, the delete is missing. I'm wondering though why the if doesn't look like "if (!lock.IsLocked())". The "if (!lock)" form seems to only be used in Tracker.
comment:3 by , 8 years ago
Replying to korli:
Right, the delete is missing. I'm wondering though why the if doesn't look like "if (!lock.IsLocked())". The "if (!lock)" form seems to only be used in Tracker.
BAutolock doesn't define the operator bool()
AutoLock defines it: http://cgit.haiku-os.org/haiku/tree/headers/private/shared/AutoLocker.h#n163
comment:4 by , 8 years ago
Wrong AutoLock operator!()
in
http://cgit.haiku-os.org/haiku/tree/headers/private/tracker/AutoLock.h#n69
Sorry!
comment:5 by , 8 years ago
We should probably convert the code still using private/tracker/AutoLock.h to private/shared/AutoLocker.h then?
report by Clang Static Analyzer