diff --git a/net/cpp/src/main.cpp b/net/cpp/src/main.cpp
index e5f0e4b7bafd530472f5457b4efd405037b66c2f..397eb148b30c22885d4a5d4b04f9b163f71032f2 100644
--- a/net/cpp/src/main.cpp
+++ b/net/cpp/src/main.cpp
@@ -89,7 +89,9 @@ int main(int argc, const char **argv) {
 		
 		handle_command(line);
 		
-		free(line);		
+#ifndef WIN32
+		free(line);
+#endif
 	}
 	stop = true;