changed malloc to nginx alloc

This commit is contained in:
Roman Arutyunyan 2012-09-13 16:19:16 +04:00
parent 8494e179d1
commit d8fbe51e3f
2 changed files with 4 additions and 9 deletions

View file

@ -12,10 +12,6 @@
#include "ngx_rtmp_record_module.h"
#include <stdlib.h>
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#ifdef NGX_LINUX
#include <unistd.h>
#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);
}

View file

@ -6,9 +6,6 @@
#include "ngx_rtmp_cmd_module.h"
#include "ngx_rtmp_eval.h"
#include <stdlib.h>
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#ifdef NGX_LINUX
#include <unistd.h>
@ -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);
}