From d8fbe51e3fc5d390bc40ee51f6ef54b58ebe64a6 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Thu, 13 Sep 2012 16:19:16 +0400 Subject: [PATCH] changed malloc to nginx alloc --- ngx_rtmp_enotify_module.c | 7 ++----- ngx_rtmp_exec_module.c | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ngx_rtmp_enotify_module.c b/ngx_rtmp_enotify_module.c index d62c83a..d74588a 100644 --- a/ngx_rtmp_enotify_module.c +++ b/ngx_rtmp_enotify_module.c @@ -12,10 +12,6 @@ #include "ngx_rtmp_record_module.h" #include -#ifdef HAVE_MALLOC_H -#include -#endif - #ifdef NGX_LINUX #include #endif @@ -261,7 +257,8 @@ ngx_rtmp_enotify_exec(ngx_rtmp_session_t *s, ngx_rtmp_enotify_conf_t *ec) case 0: /* child */ - args = malloc((ec->args.nelts + 2) * sizeof(char *)); + args = ngx_palloc(s->connection->pool, + (ec->args.nelts + 2) * sizeof(char *)); if (args == NULL) { exit(1); } diff --git a/ngx_rtmp_exec_module.c b/ngx_rtmp_exec_module.c index ed5bed6..1069256 100644 --- a/ngx_rtmp_exec_module.c +++ b/ngx_rtmp_exec_module.c @@ -6,9 +6,6 @@ #include "ngx_rtmp_cmd_module.h" #include "ngx_rtmp_eval.h" #include -#ifdef HAVE_MALLOC_H -#include -#endif #ifdef NGX_LINUX #include @@ -340,7 +337,8 @@ ngx_rtmp_exec_run(ngx_rtmp_session_t *s, size_t n) case 0: /* child */ - args = malloc((ec->args.nelts + 2) * sizeof(char *)); + args = ngx_palloc(s->connection->pool, + (ec->args.nelts + 2) * sizeof(char *)); if (args == NULL) { exit(1); }