bug-myserver
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-myserver] [Bugfix] myserver.cpp


From: Daniele
Subject: [bug-myserver] [Bugfix] myserver.cpp
Date: Sat, 27 Mar 2010 21:31:29 +0100

Hi folks,
I've spotted a possible bug in the main() routine of myserver.cpp. There's a variable initialized via the "new" operator which is not in a try/catch block and doesn't use the "nothrow" clause. This might lead to an uncaught "bad_alloc" exception which would abort the execution of the server.

I'm attaching my proposed refactoring for the mentioned code.
bye ;)

Attachment: bad_alloc.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]