diff options
-rw-r--r-- | usr/src/boot/lib/libstand/tftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr/src/boot/lib/libstand/tftp.c b/usr/src/boot/lib/libstand/tftp.c index c6d519d2ec..1e6beb0378 100644 --- a/usr/src/boot/lib/libstand/tftp.c +++ b/usr/src/boot/lib/libstand/tftp.c @@ -454,8 +454,10 @@ tftp_open(const char *path, struct open_file *f) memset(tftpfile, 0, sizeof(*tftpfile)); tftpfile->tftp_blksize = TFTP_REQUESTED_BLKSIZE; tftpfile->iodesc = io = socktodesc(*(int *) (f->f_devdata)); - if (io == NULL) + if (io == NULL) { + free(tftpfile); return (EINVAL); + } io->destip = servip; tftpfile->off = 0; |