From e443ea67c22f3ee07eeae688892ebbd8ef64114e Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Wed, 27 Oct 2004 22:24:15 +0000 Subject: [PATCH] Fix crash in parser. (Logical change 1.98) git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@357 fd59a12c-fef9-0310-b244-a6a79926bd2f --- exec/parse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exec/parse.c b/exec/parse.c index a681cd82..e743b198 100644 --- a/exec/parse.c +++ b/exec/parse.c @@ -427,9 +427,8 @@ extern int openais_main_config_read (char **error_string, openais_config->interfaces = malloc (sizeof (struct gmi_interface) * interface_max); if (openais_config->interfaces == 0) { parse_done = 1; - - error_reason = "Out of memory trying to allocate ethernet interface storage area"; - goto parse_error; + *error_string = "Out of memory trying to allocate ethernet interface storage area"; + return -1; } memset (openais_config->interfaces, 0, @@ -440,7 +439,8 @@ extern int openais_main_config_read (char **error_string, if (fp == 0) { parse_done = 1; sprintf (error_reason, "Can't read file reason = %s", strerror (errno)); - goto parse_error; + *error_string = error_reason; + return -1; } while (fgets (line, 255, fp)) {