mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Remove unneccessary NULL check in srs_freep. v5.0.150, v6.0.38 (#3477)
Co-authored-by: winlin <winlin@vip.126.com> Co-authored-by: john <hondaxiao@tencent.com>
This commit is contained in:
parent
d8755711c1
commit
b574ad1a07
4 changed files with 8 additions and 10 deletions
|
@ -44,17 +44,13 @@
|
|||
// To free the p and set to NULL.
|
||||
// @remark The p must be a pointer T*.
|
||||
#define srs_freep(p) \
|
||||
if (p) { \
|
||||
delete p; \
|
||||
p = NULL; \
|
||||
} \
|
||||
delete p; \
|
||||
p = NULL; \
|
||||
(void)0
|
||||
// Please use the freepa(T[]) to free an array, otherwise the behavior is undefined.
|
||||
#define srs_freepa(pa) \
|
||||
if (pa) { \
|
||||
delete[] pa; \
|
||||
pa = NULL; \
|
||||
} \
|
||||
delete[] pa; \
|
||||
pa = NULL; \
|
||||
(void)0
|
||||
|
||||
// Check CPU for ST(state-threads), please read https://github.com/ossrs/state-threads/issues/22
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 148
|
||||
#define VERSION_REVISION 150
|
||||
|
||||
#endif
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
|
||||
#define VERSION_MAJOR 6
|
||||
#define VERSION_MINOR 0
|
||||
#define VERSION_REVISION 36
|
||||
#define VERSION_REVISION 38
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue