Fix 2 leaks. (unlikely to occur though)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3670
This commit is contained in:
parent
02b866dc4a
commit
fceeb4756c
2 changed files with 4 additions and 3 deletions
|
@ -45,6 +45,7 @@ bool SERIAL_open(const char* portname, COMPORT* port) {
|
|||
int len = strlen(portname);
|
||||
if(len > 240) {
|
||||
SetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
free(cp);
|
||||
return false;
|
||||
}
|
||||
char extended_portname[256] = "\\\\.\\";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue