[apparmor] [patch 2/5] parser - fix dbus peer_conds memory leak in new_dbus_entry()

Tyler Hicks tyhicks at canonical.com
Fri Sep 6 18:57:51 UTC 2013


On 2013-09-05 01:18:55, Steve Beattie wrote:
> The function new_dbus_entry() free()s the conds argument but not the
> peer_conds argument.
> 
> (Hat tip to valgrind for finding this leak.)
> 
> Signed-off-by: Steve Beattie <steve at nxnw.org>

Nice catch! (and shame on me for not using valgrind)

Acked-by: Tyler Hicks <tyhicks at canonical.com>

> 
> ---
>  parser/dbus.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: b/parser/dbus.c
> ===================================================================
> --- a/parser/dbus.c
> +++ b/parser/dbus.c
> @@ -138,6 +138,7 @@ struct dbus_entry *new_dbus_entry(int mo
>  
>  out:
>  	free_cond_list(conds);
> +	free_cond_list(peer_conds);
>  	return ent;
>  }
>  
> 
> 
> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130906/6b32d307/attachment-0001.pgp>


More information about the AppArmor mailing list