tests/pkd: Properly clean up memory

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2018-10-30 14:14:03 +01:00
parent c8519c435e
commit e1a8b359c1
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

@@ -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: