OSDN Git Service

do not loop in case message exception has no message
authorOtavio Salvador <otavio@ossystems.com.br>
Thu, 24 Apr 2008 20:46:28 +0000 (17:46 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Sat, 26 Apr 2008 23:44:57 +0000 (20:44 -0300)
The exception handler was looping when the exception had no message.

libparted/exception.c

index c9a50bb..5fb3c79 100644 (file)
@@ -242,7 +242,7 @@ ped_exception_throw (PedExceptionType ex_type,
        ex->type = ex_type;
        ex->options = ex_opts;
 
-       while (1) {
+       while (message) {
                        ex->message = (char*) malloc (size * sizeof (char));
                        if (!ex->message)
                                        goto no_memory;