diff options
Diffstat (limited to 'tftp.c')
-rw-r--r-- | tftp.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -387,12 +387,11 @@ int tftp_main(int argc, char **argv) | |||
387 | 387 | ||
388 | serverfile = cp + 1; | 388 | serverfile = cp + 1; |
389 | 389 | ||
390 | if ((s = strdup(serverstr))) { | 390 | s = xstrdup(serverstr); |
391 | s[cp - serverstr] = '\0'; | 391 | s[cp - serverstr] = '\0'; |
392 | 392 | ||
393 | if ((host = gethostbyname(s))) { | 393 | if ((host = gethostbyname(s))) { |
394 | bad = 0; | 394 | bad = 0; |
395 | } | ||
396 | } | 395 | } |
397 | 396 | ||
398 | free(s); | 397 | free(s); |