From c092d19ecdd04f0805e52b7671b91678a2bb74e2 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Thu, 24 Apr 2008 17:46:28 -0300 Subject: [PATCH] do not loop in case message exception has no message The exception handler was looping when the exception had no message. --- libparted/exception.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libparted/exception.c b/libparted/exception.c index c9a50bb..5fb3c79 100644 --- a/libparted/exception.c +++ b/libparted/exception.c @@ -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; -- 2.11.0