Skip to content

Commit 8331ae3

Browse files
committed
[fix] fix some potential crash bugs.
1 parent 37fc521 commit 8331ae3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Donate if you like this module. Many thanks to you!
6666

6767
## Installation
6868

69-
### Install in RHEL/CentOS (Thanks [dvershinin](https://github.com/dvershinin))
69+
### Install in RHEL/CentOS (Thanks to [dvershinin](https://github.com/dvershinin))
7070

7171
#### RHEL/CentOS 6, 7
7272

@@ -89,7 +89,7 @@ Now configuration files named `http-flv.conf` for HTTP-FLV feature and `rtmp.con
8989

9090
include /etc/nginx/http-flv/rtmp.conf;
9191

92-
To enable this module, add the following to `/etc/nginx/nginx.conf` and reload NGINX:
92+
To enable this module, add the following to `/etc/nginx/nginx.conf` and start or reload NGINX:
9393

9494
load_module modules/ngx_http_flv_live_module.so;
9595

ngx_http_flv_live_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1923,12 +1923,12 @@ ngx_http_flv_live_init_session(ngx_http_request_t *r,
19231923
return s;
19241924

19251925
failed:
1926-
if (s->out_pool) {
1926+
if (s && s->out_pool) {
19271927
ngx_destroy_pool(s->out_pool);
19281928
s->out_pool = NULL;
19291929
}
19301930

1931-
if (s->in_streams_pool) {
1931+
if (s && s->in_streams_pool) {
19321932
ngx_destroy_pool(s->in_streams_pool);
19331933
s->in_streams_pool = NULL;
19341934
}

ngx_rtmp_init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ ngx_rtmp_init_session(ngx_connection_t *c, ngx_rtmp_addr_conf_t *addr_conf)
243243
return s;
244244

245245
failed:
246-
if (s->out_pool) {
246+
if (s && s->out_pool) {
247247
ngx_destroy_pool(s->out_pool);
248248
s->out_pool = NULL;
249249
}
250250

251-
if (s->in_streams_pool) {
251+
if (s && s->in_streams_pool) {
252252
ngx_destroy_pool(s->in_streams_pool);
253253
s->in_streams_pool = NULL;
254254
}

0 commit comments

Comments
 (0)