[libvirt] [PATCH 1/2] Fix memory leak in set_other_id_info

2018-01-09 Thread Adam Majer
model was allocated by asprintf but never freed after usage and assignment. Signed-off-by: Adam Majer --- src/Virt_ComputerSystem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c index da07f93..b4930ac 100644 --- a/src

[libvirt] [cim][PATCH 0/2] memory leak fixes in CIM provider

2018-01-09 Thread Adam Majer
In some instances, asprintf allocated memory is not freed resulting in a slow memory leak. Adam Majer (2): Fix memory leak in set_other_id_info Fix memory leak in set_input_props src/Virt_ComputerSystem.c | 2 ++ src/Virt_SettingsDefineCapabilities.c | 6 -- 2 files changed

[libvirt] [PATCH 2/2] Fix memory leak in set_input_props

2018-01-09 Thread Adam Majer
When caption is specified, cap was allocated and assigned a new pointer while the old never freed. Free cap before replacing it. get_input_dev_caption only returns valid cap pointer on success, so do not try to free it on failure. Signed-off-by: Adam Majer --- src

Re: [libvirt] [cim][PATCH 1/2] Fix memory leak in set_other_id_info

2018-01-09 Thread Adam Majer
On 12/18/2017 02:31 PM, John Ferlan wrote: > Looks OK; however, there hasn't been a non build related source code > change to libvirt-cim since June 2014. So while this could be pushed, > I'm curious to understand why the "sudden interest" in CIM? The last > release was July 2013! I'm not sure th

[libvirt] [cim][PATCH 2/2] Fix memory leak in set_input_props

2017-12-15 Thread Adam Majer
: Adam Majer --- src/Virt_SettingsDefineCapabilities.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c index 85cb27a..e07de59 100644 --- a/src/Virt_SettingsDefineCapabilities.c +++ b/src

[libvirt] [cim][PATCH 1/2] Fix memory leak in set_other_id_info

2017-12-15 Thread Adam Majer
model was allocated by asprintf but never freed after usage and assignement. Signed-off-by: Adam Majer --- src/Virt_ComputerSystem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c index da07f93..b4930ac 100644 --- a/src