From e1a8b359c181508d973da681b1c698db7a6dbd20 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Tue, 30 Oct 2018 14:14:03 +0100 Subject: [PATCH] tests/pkd: Properly clean up memory Signed-off-by: Jakub Jelen Reviewed-by: Andreas Schneider --- tests/pkd/pkd_daemon.h | 2 +- tests/pkd/pkd_hello.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/pkd/pkd_daemon.h b/tests/pkd/pkd_daemon.h index f3ef4e67..3b37bc5d 100644 --- a/tests/pkd/pkd_daemon.h +++ b/tests/pkd/pkd_daemon.h @@ -35,7 +35,7 @@ struct pkd_daemon_args { unsigned int iterations; struct { - const char *mkdtemp_str; + char *mkdtemp_str; } socket_wrapper; } opts; }; diff --git a/tests/pkd/pkd_hello.c b/tests/pkd/pkd_hello.c index 0fa72d04..3f18b5f2 100644 --- a/tests/pkd/pkd_hello.c +++ b/tests/pkd/pkd_hello.c @@ -874,6 +874,8 @@ static int pkd_cleanup_socket_wrapper(void) { goto errrmdir; } + free(pkd_dargs.opts.socket_wrapper.mkdtemp_str); + goto out; errrmdir: errrmfiles: