summaryrefslogtreecommitdiff
path: root/contrib/pg_standby
diff options
context:
space:
mode:
authorBruce Momjian2012-10-12 17:35:40 +0000
committerBruce Momjian2012-10-12 17:35:43 +0000
commit49ec613201b2e9debdf9e9ad9a2ad7c6c8083729 (patch)
tree16626d363ecc7b021b2fda82bb27b811e2335c09 /contrib/pg_standby
parenta29f7ed5544ef583747c0dcc3fc2afac1fb191ef (diff)
In our source code, make a copy of getopt's 'optarg' string arguments,
rather than just storing a pointer.
Diffstat (limited to 'contrib/pg_standby')
-rw-r--r--contrib/pg_standby/pg_standby.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index 84941ede137..659bd50da7d 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -643,7 +643,7 @@ main(int argc, char **argv)
}
break;
case 't': /* Trigger file */
- triggerPath = optarg;
+ triggerPath = strdup(optarg);
break;
case 'w': /* Max wait time */
maxwaittime = atoi(optarg);