diff options
author | dlg <dlg@openbsd.org> | 2013-03-17 09:48:36 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2013-03-17 09:48:36 +0000 |
commit | ba119d57593a645569ceda4752af1b5a735d6352 (patch) | |
tree | 62db6750e3e8364bea614e22807679b06b485a60 /usr.sbin/tftpd | |
parent | Update the page to mention all of the Velocity controller models. (diff) | |
download | wireguard-openbsd-ba119d57593a645569ceda4752af1b5a735d6352.tar.xz wireguard-openbsd-ba119d57593a645569ceda4752af1b5a735d6352.zip |
i missed the bit of maxime villards diff that took the client_free out of
oack on error.
his fix is better, so this marges all of it in.
Diffstat (limited to 'usr.sbin/tftpd')
-rw-r--r-- | usr.sbin/tftpd/tftpd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/usr.sbin/tftpd/tftpd.c b/usr.sbin/tftpd/tftpd.c index 21922f49a89..8eab5afb9f4 100644 --- a/usr.sbin/tftpd/tftpd.c +++ b/usr.sbin/tftpd/tftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tftpd.c,v 1.12 2013/03/15 13:13:10 dlg Exp $ */ +/* $OpenBSD: tftpd.c,v 1.13 2013/03/17 09:48:36 dlg Exp $ */ /* * Copyright (c) 2012 David Gwynne <dlg@uq.edu.au> @@ -872,14 +872,12 @@ tftp_open(struct tftp_client *client, const char *filename) int ecode; ecode = validate_access(client, filename); - if (ecode) { - nak(client, ecode); - return; - } + if (ecode) + goto error; if (client->options) { if (oack(client) == -1) - return; + goto error; free(client->options); client->options = NULL; @@ -889,6 +887,8 @@ tftp_open(struct tftp_client *client, const char *filename) sendfile(client); return; +error: + nak(client, ecode); } /* @@ -1439,7 +1439,6 @@ oack(struct tftp_client *client) return (0); error: - client_free(client); return (-1); } |