libstand: tftp_open() can leak pkt on error
The memory can be leaked if we will have pkt set and will get an error during tftp_open() processing. Differential Revision: https://reviews.freebsd.org/D12202
This commit is contained in:
parent
b40aaca6dd
commit
c7901210fb
@ -467,6 +467,7 @@ tftp_open(const char *path, struct open_file *f)
|
||||
|
||||
if (res) {
|
||||
free(tftpfile->path);
|
||||
free(tftpfile->pkt);
|
||||
free(tftpfile);
|
||||
return (res);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user