On Thu, Aug 27, 2015 at 10:35:11AM -0700, Steve Beattie wrote:
> Nope, that's more unit tests leaking memory. Try the following patch:
> 
> Signed-off-by: Steve Beattie <[email protected]>

Acked-by: Seth Arnold <[email protected]>

Thanks

> ---
>  libraries/libapparmor/src/tst_aalogmisc.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> Index: b/libraries/libapparmor/src/tst_aalogmisc.c
> ===================================================================
> --- a/libraries/libapparmor/src/tst_aalogmisc.c
> +++ b/libraries/libapparmor/src/tst_aalogmisc.c
> @@ -34,19 +34,25 @@ int main(void)
>       retstr = hex_to_string("2F746D702F646F6573206E6F74206578697374");
>       MY_TEST(retstr, "basic allocation");
>       MY_TEST(strcmp(retstr, "/tmp/does not exist") == 0, "basic dehex 1");
> +     free(retstr);
>  
>       retstr = hex_to_string("61");
>       MY_TEST(strcmp(retstr, "a") == 0, "basic dehex 2");
> +     free(retstr);
>  
>       retstr = hex_to_string("");
>       MY_TEST(strcmp(retstr, "") == 0, "empty string");
> +     free(retstr);
>  
>       /* ipproto_to_string() tests */
>       retstr = ipproto_to_string((unsigned) 99999);
>       MY_TEST(strcmp(retstr, "unknown(99999)") == 0, "invalid protocol test");
> +     free(retstr);
>  
>       retstr = ipproto_to_string((unsigned) 6);
>       MY_TEST(strcmp(retstr, "tcp") == 0, "protocol=tcp");
> +     free(retstr);
> +
>       return rc;
>  }

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to