=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp-server.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- src/usr.bin/ssh/sftp-server.c 2013/01/04 19:26:38 1.96 +++ src/usr.bin/ssh/sftp-server.c 2013/05/17 00:13:14 1.97 @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-server.c,v 1.96 2013/01/04 19:26:38 jmc Exp $ */ +/* $OpenBSD: sftp-server.c,v 1.97 2013/05/17 00:13:14 djm Exp $ */ /* * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. * @@ -310,11 +310,11 @@ if (handle_is_ok(handle, HANDLE_FILE)) { ret = close(handles[handle].fd); - xfree(handles[handle].name); + free(handles[handle].name); handle_unused(handle); } else if (handle_is_ok(handle, HANDLE_DIR)) { ret = closedir(handles[handle].dirp); - xfree(handles[handle].name); + free(handles[handle].name); handle_unused(handle); } else { errno = ENOENT; @@ -358,7 +358,7 @@ handle = get_string(&hlen); if (hlen < 256) val = handle_from_string(handle, hlen); - xfree(handle); + free(handle); return val; } @@ -441,7 +441,7 @@ handle_to_string(handle, &string, &hlen); debug("request %u: sent handle handle %d", id, handle); send_data_or_handle(SSH2_FXP_HANDLE, id, string, hlen); - xfree(string); + free(string); } static void @@ -569,7 +569,7 @@ } if (status != SSH2_FX_OK) send_status(id, status); - xfree(name); + free(name); } static void @@ -670,7 +670,7 @@ } } send_status(id, status); - xfree(data); + free(data); } static void @@ -696,7 +696,7 @@ } if (status != SSH2_FX_OK) send_status(id, status); - xfree(name); + free(name); } static void @@ -798,7 +798,7 @@ status = errno_to_portable(errno); } send_status(id, status); - xfree(name); + free(name); } static void @@ -883,7 +883,7 @@ } if (status != SSH2_FX_OK) send_status(id, status); - xfree(path); + free(path); } static void @@ -932,13 +932,13 @@ if (count > 0) { send_names(id, count, stats); for (i = 0; i < count; i++) { - xfree(stats[i].name); - xfree(stats[i].long_name); + free(stats[i].name); + free(stats[i].long_name); } } else { send_status(id, SSH2_FX_EOF); } - xfree(stats); + free(stats); } } @@ -961,7 +961,7 @@ status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; } send_status(id, status); - xfree(name); + free(name); } static void @@ -986,7 +986,7 @@ status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; } send_status(id, status); - xfree(name); + free(name); } static void @@ -1007,7 +1007,7 @@ status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; } send_status(id, status); - xfree(name); + free(name); } static void @@ -1020,7 +1020,7 @@ id = get_int(); path = get_string(NULL); if (path[0] == '\0') { - xfree(path); + free(path); path = xstrdup("."); } debug3("request %u: realpath", id); @@ -1033,7 +1033,7 @@ s.name = s.long_name = resolvedname; send_names(id, 1, &s); } - xfree(path); + free(path); } static void @@ -1087,8 +1087,8 @@ status = SSH2_FX_OK; } send_status(id, status); - xfree(oldpath); - xfree(newpath); + free(oldpath); + free(newpath); } static void @@ -1113,7 +1113,7 @@ s.name = s.long_name = buf; send_names(id, 1, &s); } - xfree(path); + free(path); } static void @@ -1136,8 +1136,8 @@ status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; } send_status(id, status); - xfree(oldpath); - xfree(newpath); + free(oldpath); + free(newpath); } static void @@ -1157,8 +1157,8 @@ status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; } send_status(id, status); - xfree(oldpath); - xfree(newpath); + free(oldpath); + free(newpath); } static void @@ -1175,7 +1175,7 @@ send_status(id, errno_to_portable(errno)); else send_statvfs(id, &st); - xfree(path); + free(path); } static void @@ -1214,8 +1214,8 @@ status = (ret == -1) ? errno_to_portable(errno) : SSH2_FX_OK; } send_status(id, status); - xfree(oldpath); - xfree(newpath); + free(oldpath); + free(newpath); } static void @@ -1236,7 +1236,7 @@ process_extended_hardlink(id); else send_status(id, SSH2_FX_OP_UNSUPPORTED); /* MUST */ - xfree(request); + free(request); } /* stolen from ssh-agent */