tests/pkd: Properly clean up memory

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit e1a8b359c1)
This commit is contained in:
Jakub Jelen
2018-10-30 14:14:03 +01:00
committed by Andreas Schneider
parent 059079581a
commit 44b32e940e
2 changed files with 3 additions and 1 deletions

View File

@@ -35,7 +35,7 @@ struct pkd_daemon_args {
unsigned int iterations;
struct {
const char *mkdtemp_str;
char *mkdtemp_str;
} socket_wrapper;
} opts;
};

View File

@@ -849,6 +849,8 @@ static int pkd_cleanup_socket_wrapper(void) {
goto errrmdir;
}
free(pkd_dargs.opts.socket_wrapper.mkdtemp_str);
goto out;
errrmdir:
errrmfiles: