From: Hartmut Holzgraefe Date: Wed, 26 Feb 2003 16:06:07 +0000 (+0000) Subject: changed to emalloc just to be safe X-Git-Tag: RELEASE_0_5~737 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=499a97a9b22dfc81daf9a5510d099ba456bb01c9;p=php changed to emalloc just to be safe --- diff --git a/ext/yp/yp.c b/ext/yp/yp.c index 8706ccffb2..cca06b17cf 100644 --- a/ext/yp/yp.c +++ b/ext/yp/yp.c @@ -296,12 +296,12 @@ static int php_foreach_cat (int instatus, char *inkey, int inkeylen, char *inval if (!err) { if (inkeylen) { - char *key = malloc(inkeylen+1); + char *key = emalloc(inkeylen+1); if(key) { strncpy(key, inkey, inkeylen); key[inkeylen] = '\0'; add_assoc_stringl_ex((zval *) indata, key, inkeylen+1, inval, invallen, 1); - free(key); + efree(key); } else { php_error(E_WARNING, "Can't allocate %d bytes for key buffer in yp_cat()"); }