Commit cbd35b68 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix memory leak on error

Don't leak pchBuffer on error.
Found by cppcheck static analysis.
Tagged as DualSerial-0_25-4_8_2_16-1 since DualSerial itself is unchanged.
parent 548ecb86
......@@ -86,6 +86,7 @@ int main(void)
if (iInputStream==0 || iOutputStream==0)
{
printf("Error: cannot open serial streams.\n");
free(pchBuffer);
return (0);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment