When a Windows program uses floating-point math (as FREEMEM does) and you link with the floating-point emulator library (SLIBCEW.LIB for small model), you must also include the WIN87LIB.LIB import library in the library field of the LINK command.
Alternatively, you can compile with the -FPa switch and link with the ”alternate math library“ (SLIBCAW.LIB for small library). This library does not use the math coprocessor chip, even if one is present.