summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2024-03-12 16:04:19 +0100
committerWerner Koch <wk@gnupg.org>2024-03-12 16:04:19 +0100
commit81536535f815187075b4bba8d2e43bdb0d0abd70 (patch)
tree29f55297fea928d5de3c1d7c5850058cd69311da
parentMerge branch 'STABLE-BRANCH-2-4' (diff)
downloadgnupg2-81536535f815187075b4bba8d2e43bdb0d0abd70.tar.xz
gnupg2-81536535f815187075b4bba8d2e43bdb0d0abd70.zip
card: Use xstrdup for module names.
--
-rw-r--r--tools/gpg-card.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gpg-card.c b/tools/gpg-card.c
index 8c9a26090..f24b74194 100644
--- a/tools/gpg-card.c
+++ b/tools/gpg-card.c
@@ -315,9 +315,9 @@ main (int argc, char **argv)
/* Set defaults for non given options. */
if (!opt.gpg_program)
- opt.gpg_program = gnupg_module_name (GNUPG_MODULE_NAME_GPG);
+ opt.gpg_program = xstrdup (gnupg_module_name (GNUPG_MODULE_NAME_GPG));
if (!opt.gpgsm_program)
- opt.gpgsm_program = gnupg_module_name (GNUPG_MODULE_NAME_GPGSM);
+ opt.gpgsm_program = xstrdup (gnupg_module_name (GNUPG_MODULE_NAME_GPGSM));
/* Now build the list of commands. We guess the size of the array
* by assuming each item is a complete command. Obviously this will