Ticket #3475 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

[patch] fix memleak in filemanager/find.c:find_parameters()

Reported by: and Owned by: andrew_b
Priority: major Milestone: 4.8.15
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

fix memleak in filemanager/find.c:find_parameters()

Direct leak of 40 byte(s) in 3 object(s) allocated from:

#0 0x4d5092 in malloc (/usr/bin/mc+0x4d5092)
#1 0x7f46e1eab7d4 in g_malloc (/usr/lib64/libglib-2.0.so.0+0x677d4)
#2 0x7f46e1ed2111 in g_strdup (/usr/lib64/libglib-2.0.so.0+0x8e111)
#3 0x6ede48 in find_parameters /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/find.c:749:19
#4 0x6ec492 in find_file /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/find.c:1768:12
#5 0x54bf5e in midnight_execute_cmd /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1209:9
#6 0x5479e4 in midnight_callback /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1559:21
#7 0x7f46e2c3391e in dlg_key_event /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:519:19
#8 0x7f46e2c341c6 in frontend_dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:570:9
#9 0x7f46e2c33dd5 in dlg_run /tmp/portage/app-misc/mc-9999/work/mc-9999/lib/widget/dialog.c:1267:5
#10 0x54722a in do_nc /tmp/portage/app-misc/mc-9999/work/mc-9999/src/filemanager/midnight.c:1762:9
#11 0x4f98cc in main /tmp/portage/app-misc/mc-9999/work/mc-9999/src/main.c:418:21
#12 0x7f46e0f7c133 in libc_start_main (/lib64/libc.so.6+0x20133)
#13 0x44e0c6 in _start (/usr/bin/mc+0x44e0c6)

found by LeakSanitizer?

Signed-off-by: Andreas Mohr <and@…>

Attachments

mc-3475-fix-memleak-find_parameters.patch (1.9 KB) - added by and 9 years ago.

Change History

Changed 9 years ago by and

comment:1 Changed 9 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.15

Branch: 3475_find_file_memleak
Initial changeset:57a1d639fd6b93d5e893edcee1f8ce1dc73dd45b

comment:2 Changed 9 years ago by slavazanko

  • Votes for changeset set to slavazanko
  • Branch state changed from on review to approved

Approved, but please fix a description in changeset:57a1d639fd6b93d5e893edcee1f8ce1dc73dd45b

- Ficket
+ Ticket

comment:3 Changed 9 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from slavazanko to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [d8c7f45c6f506ee8b6912e5b0cee6be390263f0a].

git log --pretty=oneline 2c37497..d8c7f45

comment:4 Changed 9 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.