mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-19 09:41:07 +02:00
changed malloc to nginx alloc
This commit is contained in:
parent
8494e179d1
commit
d8fbe51e3f
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue