aboutsummaryrefslogtreecommitdiff
path: root/tftp.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-03-23 17:10:19 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-03-23 17:10:19 +0000
commitc14a666719795d76e7a98394f64fecb6cfc7bc09 (patch)
treebb635a9ec39e2055e0d3b2fd386d18bb12cebfcc /tftp.c
parent3419aea6e304404f0cf4f0f88d57a92a0256754e (diff)
downloadbusybox-w32-c14a666719795d76e7a98394f64fecb6cfc7bc09.tar.gz
busybox-w32-c14a666719795d76e7a98394f64fecb6cfc7bc09.tar.bz2
busybox-w32-c14a666719795d76e7a98394f64fecb6cfc7bc09.zip
xstrdup tftp cleanup from Jeff Garzik
git-svn-id: svn://busybox.net/trunk/busybox@2193 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tftp.c')
-rw-r--r--tftp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tftp.c b/tftp.c
index e4e01b9a2..309df36b3 100644
--- a/tftp.c
+++ b/tftp.c
@@ -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);