[prev in list] [next in list] [prev in thread] [next in thread]
List: amarok-bugs-dist
Subject: =?UTF-8?B?W2FtYXJva10gW0J1ZyA0MTkxMzJdIE5ldzogcG90ZW50aWFsIG1l?= =?UTF-8?B?bW9yeSBsZWFrYWdlOiBmb3JnZ
From: bugzilla_noreply () kde ! org
Date: 2020-03-23 8:19:35
Message-ID: bug-419132-71684 () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=419132
Bug ID: 419132
Summary: potential memory leakage: forget using libxml2 API
'xmlXPathFreeContext‘ after 'xmlXPathNewContext'
Product: amarok
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: Tools/Statistics Synchronization
Assignee: amarok-bugs-dist@kde.org
Reporter: summerlinasity@gmail.com
Target Milestone: kf5
SUMMARY
I found this issue when reading source code in the file
'src/services/mp3tunes/libmp3tunes/locker.c'.
STEPS TO REPRODUCE
1. first, there are 2 functions using libxml2 API: the defined xml_xpath_init()
in 84 line uses API 'xmlXPathNewContext', the defined xml_xpath_deinit() in 119
line uses API 'xmlXPathFreeContext'.
2. the second usage of xml_xpath_init() in this c file lies in 422 line, inside
the defined function mp3tunes_locker_api_post_fetch()
3. then mp3tunes_locker_api_post_fetch() is used in line 1391. After it,
xml_xpath_deinit() is not called to free 'result->xpath_ctx' while free() is
used directly to free 'result'.
So the unfree 'result->xpath_ctx' memory is leaked.
OBSERVED RESULT
EXPECTED RESULT
SOFTWARE/OS VERSIONS
Windows:
macOS:
Linux/KDE Plasma:
(available in About System)
KDE Plasma Version:
KDE Frameworks Version:
Qt Version:
ADDITIONAL INFORMATION
--
You are receiving this mail because:
You are the assignee for the bug.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic