From 7e233c06b1e699e8a33a4de572c7ea0525f755e7 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 21 Jun 2007 22:59:00 +0000 Subject: [PATCH] Recovered from cvs revision 2007-06-21 13:59:00 --- ase/awk/parse.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ase/awk/parse.c b/ase/awk/parse.c index 003dd0ff..43774839 100644 --- a/ase/awk/parse.c +++ b/ase/awk/parse.c @@ -1,5 +1,5 @@ /* - * $Id: parse.c,v 1.8 2007/06/18 14:05:18 bacon Exp $ + * $Id: parse.c,v 1.9 2007/06/20 13:28:15 bacon Exp $ * * {License} */ @@ -407,7 +407,11 @@ int ase_awk_setword (ase_awk_t* awk, v = (ase_cstr_t*) ASE_AWK_MALLOC ( awk, ASE_SIZEOF(ase_cstr_t)+((nlen+1)*ASE_SIZEOF(*nkw))); - if (v == ASE_NULL) return -1; + if (v == ASE_NULL) + { + SETERR (awk, ASE_AWK_ENOMEM); + return -1; + } v->len = nlen; v->ptr = (const ase_char_t*)(v + 1); @@ -417,6 +421,7 @@ int ase_awk_setword (ase_awk_t* awk, if (ase_awk_map_put (awk->kwtab, okw, olen, v) == ASE_NULL) { ASE_AWK_FREE (awk, v); + SETERR (awk, ASE_AWK_ENOMEM); return -1; }