summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2003-02-26 16:06:07 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2003-02-26 16:06:07 +0000
commit499a97a9b22dfc81daf9a5510d099ba456bb01c9 (patch)
tree2ac28839580c56655473a5d030dd7c545791184d
parentf7490c405b712f77ef11982f5fec054f97ce1dd6 (diff)
downloadphp-git-499a97a9b22dfc81daf9a5510d099ba456bb01c9.tar.gz
changed to emalloc just to be safe
-rw-r--r--ext/yp/yp.c4
1 files changed, 2 insertions, 2 deletions
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()");
}