Re: [PATCH] qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get

2021-01-15 Thread Hao Wu via
On Fri, Jan 15, 2021 at 9:17 AM Havard Skinnemoen wrote: > +Hao Wu > > On Fri, Jan 15, 2021 at 1:15 AM Philippe Mathieu-Daudé > wrote: > > > > On 1/15/21 8:56 AM, Gan Qixin wrote: > > > The pwm_qom_get function didn't free "response", which caused an > indirect > > > memory leak. So use

Re: [PATCH] qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get

2021-01-15 Thread Havard Skinnemoen via
+Hao Wu On Fri, Jan 15, 2021 at 1:15 AM Philippe Mathieu-Daudé wrote: > > On 1/15/21 8:56 AM, Gan Qixin wrote: > > The pwm_qom_get function didn't free "response", which caused an indirect > > memory leak. So use qobject_unref() to fix it. > > > > ASAN shows memory leak stack: > > > > Indirect

Re: [PATCH] qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get

2021-01-15 Thread Philippe Mathieu-Daudé
On 1/15/21 8:56 AM, Gan Qixin wrote: > The pwm_qom_get function didn't free "response", which caused an indirect > memory leak. So use qobject_unref() to fix it. > > ASAN shows memory leak stack: > > Indirect leak of 7416 byte(s) in 18000 object(s) allocated from: > #0 0x7f96e2f79d4e in

[PATCH] qtest/npcm7xx_pwm-test: Fix memleak in pwm_qom_get

2021-01-14 Thread Gan Qixin
The pwm_qom_get function didn't free "response", which caused an indirect memory leak. So use qobject_unref() to fix it. ASAN shows memory leak stack: Indirect leak of 7416 byte(s) in 18000 object(s) allocated from: #0 0x7f96e2f79d4e in __interceptor_calloc (/lib64/libasan.so.5+0x112d4e)