X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuhttpd.git;a=blobdiff_plain;f=main.c;fp=main.c;h=38d023fa1699b8ee52c716f0de5457696688dbff;hp=99a4025da72c2cb886ddebe9a7facd405a33f455;hb=31b459cb1d0ba3280cbc3fc06ce6fab903c07da6;hpb=f9dad9ffdd41c00d1fc7420f2f55983c7f6df8bc diff --git a/main.c b/main.c index 99a4025..38d023f 100644 --- a/main.c +++ b/main.c @@ -249,6 +249,7 @@ int main(int argc, char **argv) break; #endif case 'p': + optarg = strdup(optarg); bound += add_listener_arg(optarg, (ch == 's')); break; @@ -305,6 +306,7 @@ int main(int argc, char **argv) break; case 'i': + optarg = strdup(optarg); port = strchr(optarg, '='); if (optarg[0] != '.' || !port) { fprintf(stderr, "Error: Invalid interpreter: %s\n", @@ -337,6 +339,7 @@ int main(int argc, char **argv) break; case 'd': + optarg = strdup(optarg); port = alloca(strlen(optarg) + 1); if (!port) return -1;