[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH (speechd) 3/3] Repare two tiny memory leaks.
From: |
Luke Yelavich |
Subject: |
[PATCH (speechd) 3/3] Repare two tiny memory leaks. |
Date: |
Mon, 15 Feb 2010 09:27:52 +1100 |
On Mon, Feb 15, 2010 at 08:57:52AM EST, Christopher Brannon wrote:
> In the function logging_init, a block is allocated, and a pointer is
> stored in file_name. The pointer is lost as soon as the function returns.
>
> In main, from src/server/speechd.c,
> g_path_get_dirname() was used as an argument to mkdir. g_path_get_dirname
> returns a pointer to an allocated string, and that pointer was lost as
> soon as mkdir returned.
> Instead, I placed it in a temporary variable, freeing it after mkdir.
Applied, thanks.