From: Sascha Wildner Date: Tue, 19 Aug 2014 20:10:10 +0000 (+0200) Subject: libstand: Add a missing free() in an error path. X-Git-Url: https://gitweb.dragonflybsd.org/~mneumann/dragonfly.git/commitdiff_plain/750046bf9b5941ae57c1a05861e24dad04c1c4a4 libstand: Add a missing free() in an error path. --- diff --git a/lib/libstand/tftp.c b/lib/libstand/tftp.c index 7c9af52e42..be7f098394 100644 --- a/lib/libstand/tftp.c +++ b/lib/libstand/tftp.c @@ -280,8 +280,10 @@ tftp_open(const char *path, struct open_file *f) return (ENOMEM); tftpfile->iodesc = io = socktodesc(*(int *) (f->f_devdata)); - if (io == NULL) + if (io == NULL) { + free(tftpfile); return (EINVAL); + } io->destip = servip; tftpfile->off = 0;