mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Check for NULL pointer in LT_DLMEM_REASSIGN() before freeing it.
svn path=/trunk/yasm/; revision=769
This commit is contained in:
parent
fab557b414
commit
53f6123eaf
1 changed files with 1 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr))
|
|||
#define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp)))
|
||||
|
||||
#define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \
|
||||
if ((p) != (q)) { lt_dlfree (p); (p) = (q); (q) = 0; } \
|
||||
if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \
|
||||
} LT_STMT_END
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue