[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH trivial] init_paths: fix minor memory leak
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-trivial] [PATCH trivial] init_paths: fix minor memory leak |
Date: |
Sun, 27 Apr 2014 13:15:39 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.4.0 |
10.04.2014 18:07, Kirill Batuzov wrote:
> Fields "name" (created with strdup in new_entry) and "pathname"
> (created with g_strdup_printf in new_entry) of pathelem struct should
> be freed before the whole struct is.
Applied to -trivial, thanks!
The fun thing here is that the code _looks_ correct. I think
it might be better to create proper API for destroying path
elements - new_entry() and its destroying counterpart, free_entry().
/mjt