mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-06-01 06:09:32 +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 "ngx_rtmp_record_module.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef HAVE_MALLOC_H
|
|
||||||
#include <malloc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NGX_LINUX
|
#ifdef NGX_LINUX
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -261,7 +257,8 @@ ngx_rtmp_enotify_exec(ngx_rtmp_session_t *s, ngx_rtmp_enotify_conf_t *ec)
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
/* child */
|
/* child */
|
||||||
args = malloc((ec->args.nelts + 2) * sizeof(char *));
|
args = ngx_palloc(s->connection->pool,
|
||||||
|
(ec->args.nelts + 2) * sizeof(char *));
|
||||||
if (args == NULL) {
|
if (args == NULL) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
#include "ngx_rtmp_cmd_module.h"
|
#include "ngx_rtmp_cmd_module.h"
|
||||||
#include "ngx_rtmp_eval.h"
|
#include "ngx_rtmp_eval.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#ifdef HAVE_MALLOC_H
|
|
||||||
#include <malloc.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NGX_LINUX
|
#ifdef NGX_LINUX
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -340,7 +337,8 @@ ngx_rtmp_exec_run(ngx_rtmp_session_t *s, size_t n)
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
/* child */
|
/* child */
|
||||||
args = malloc((ec->args.nelts + 2) * sizeof(char *));
|
args = ngx_palloc(s->connection->pool,
|
||||||
|
(ec->args.nelts + 2) * sizeof(char *));
|
||||||
if (args == NULL) {
|
if (args == NULL) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue