summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-04-21 18:18:59 +1200
committerOlly Betts <olly@survex.com>2021-04-21 18:18:59 +1200
commit2920ba1cf6983bcfcf80e4f491a952be30793bad (patch)
tree7857b0081a8fa6a41910c9a010cc2b4feb0e7476
parent3f9723b896935f1edaa3ef791252a098e037e8c8 (diff)
downloadswig-2920ba1cf6983bcfcf80e4f491a952be30793bad.tar.gz
Use malloc() not emalloc() when free() gets used
-rw-r--r--Lib/php/php.swg2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/php/php.swg b/Lib/php/php.swg
index a4d6e56fa..4cef9028d 100644
--- a/Lib/php/php.swg
+++ b/Lib/php/php.swg
@@ -411,7 +411,7 @@
#ifdef __cplusplus
$&1_ltype resultobj = new $1_ltype((const $1_ltype &) $1);
#else
- $&1_ltype resultobj = ($&1_ltype) emalloc(sizeof($1_type));
+ $&1_ltype resultobj = ($&1_ltype) malloc(sizeof($1_type));
memcpy(resultobj, &$1, sizeof($1_type));
#endif
SWIG_SetPointerZval($result, (void *)resultobj, $&1_descriptor, 1);