Check for NULL pointer in LT_DLMEM_REASSIGN() before freeing it.

svn path=/trunk/yasm/; revision=769
0.3
Peter Johnson 22 years ago
parent fab557b414
commit 53f6123eaf
  1. 2
      libltdl/ltdl.c

@ -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…
Cancel
Save