tests/pkd: adjust usage of argv strings

Adjust some subtle usage of argv string handling in the pkd
test options: rather than conditionally overwrite the two
mkdtemp strings with a newly-allocated buffer to be later
freed, keep the original const argv pointer around in its
own dedicated field.

See also these changes in the same area that were due to the
previous arrangement, which was a bit too subtle:
 - 61ce3310b864802a101cb01ff103f0bc2da936e6
 - e1a8b359c1

Addresses:
 - https://gitlab.com/libssh/libssh-mirror/-/merge_requests/320#note_1173911211

Signed-off-by: Jon Simons <jon@jonsimons.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Jon Simons
2022-11-16 19:07:22 -05:00
committed by Jakub Jelen
parent 44f60d878a
commit 0fa215e2ac
2 changed files with 8 additions and 6 deletions

View File

@@ -44,10 +44,12 @@ struct pkd_daemon_args {
unsigned int iterations;
struct {
const char *argv_mkdtemp_str;
char *mkdtemp_str;
} socket_wrapper;
struct {
const char *argv_mkdtemp_str;
char *mkdtemp_str;
} temp_dir;
} opts;