Skip to content

Commit 5965b12

Browse files
committed
Update PCRE memory allocation functions
1 parent 9179e5e commit 5965b12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ProcessHacker/pcre/pcre2_context.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ POSSIBILITY OF SUCH DAMAGE.
3838
-----------------------------------------------------------------------------
3939
*/
4040

41+
#include <phbase.h>
42+
4143
#define HAVE_CONFIG_H
4244
#ifdef HAVE_CONFIG_H
4345
#include "config.h"
@@ -56,14 +58,14 @@ POSSIBILITY OF SUCH DAMAGE.
5658
static void *default_malloc(size_t size, void *data)
5759
{
5860
(void)data;
59-
return malloc(size);
61+
return PhAllocateSafe(size);
6062
}
6163

6264

6365
static void default_free(void *block, void *data)
6466
{
6567
(void)data;
66-
free(block);
68+
PhFree(block);
6769
}
6870

6971

0 commit comments

Comments
 (0)